Execution of script mpower as a function is not supported
Show older comments
Error using readtable (line 22)
Execution of script mpower as a function is not supported:
D:\App Files\MATLAB\toolbox\matlab\matfun\mpower.m
I keep having this issue in r2026a. I ran the same code on the browser and it works perfectly fine. i even tried it on a different pc and it works. please help me figure out what to do.
Answers (2)
You most likely have a script you saved as mpower.m.
Do something like this to determine that --
which mpower -all
Your result will also return your script.
The solution is to rename the script to something that does not conflict with a built-in MATLAB function, yet describes what it does.
.
Walter Roberson
on 7 Aug 2026 at 15:53
0 votes
Your D:\App Files\MATLAB\toolbox\matlab\matfun\mpower.m is probably corrupted.
In R2025b at least, mpower really is a MATLAB function, not a built-in. If it is showing up a script, that indicates that something has happened to it.
For example, perhaps a breakpoint happened within it so the code for it automatically opened in the editor, and perhaps you accidentally typed some character in the code and then the revised code automatically got saved when you navigated to a different file.
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!