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

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.

Réponses (2)

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 commentaires

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?
Start your own question and attach your script and the data file you're trying to load.

Connectez-vous pour commenter.

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.

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Produits

Tags

Question posée :

le 3 Nov 2012

Commenté :

le 29 Avr 2015

Community Treasure Hunt

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

Start Hunting!

Translated by