Error message whrn loading a program about "columns" not the same as previous lines?

3 次查看(过去 30 天)
I'm new to MATLAB-2007. I have an example .m file (ASCII) but everytime I tried to load it, it returns with this stupid error message in red.
>> load abc.m
??? Error using ==> load
Number of columns on line 91 of ASCII file D:\MATLAB\abc.m
must be the same as previous lines.
I have no idea why. However if I cut and paste the the whole abc.m file and it works fine.
Any suggestion is greatly welcome.

回答(2 个)

Matt Fig
Matt Fig 2012-11-3
Why are you trying to load an M-file? An M-file is a MATLAB file that holds coded instructions, often in the form of a function or a script. The LOAD command is for loading data files, like .mat files. What are you trying to accomplish?
  2 个评论
Muresan Aronia
Muresan Aronia 2015-4-29
Hi.I'm having the same problem like above.I have to simulate an HF channel in AWR-VSS and for this I'm using the MATLAB block.I already have an .m file and I want to load it intro the matlab block but I'm receiving the same error. Can you explain me why?

请先登录,再进行评论。


Image Analyst
Image Analyst 2012-11-3
Just run abc by typing abc on the command line or by clicking the green "Run" triangle. You will need to make the folder that it lives in the "Current folder" if that folder is not on the path. Don't use the load function to run an m-file, you simply type it's name.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by