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

1 view (last 30 days)
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.

Answers (2)

Matt Fig
Matt Fig on 3 Nov 2012
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 Comments
Muresan Aronia
Muresan Aronia on 29 Apr 2015
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 on 29 Apr 2015
Start your own question and attach your script and the data file you're trying to load.

Sign in to comment.


Image Analyst
Image Analyst on 3 Nov 2012
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.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!