Execution of script mpower as a function is not supported

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
/MATLAB/toolbox/matlab/matfun/mpower.m /MATLAB/toolbox/control/ctrlmodels/@InputOutputModel/mpower.m % InputOutputModel method /MATLAB/toolbox/parallel/array/distributed/@codistributed/mpower.m % codistributed method /MATLAB/toolbox/parallel/gpu/gpu/@gpuArray/mpower.m % gpuArray method /MATLAB/toolbox/wavelet/core/wavelet/@laurpoly/mpower.m % laurpoly method
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.
.
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.

Products

Release

R2026a

Asked:

on 7 Aug 2026 at 9:51

Answered:

on 7 Aug 2026 at 15:53

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!