MATLAB Answers

Number of columns on line 2 of ASCII file [ ].m must be the same as previous lines.

4 views (last 30 days)
Vu Tuan Long
Vu Tuan Long on 18 Sep 2017
Answered: Henry Giddens on 18 Sep 2017
Here is my code:
t = linspace(0,2*pi,100);
hold on;
ylabel('function value');
xlim([0 2*pi]);
ylim([-1.4 1.4])
I get the above message when using load [].m, while it runs well when copied to the workspace.

Answers (1)

Henry Giddens
Henry Giddens on 18 Sep 2017
If you just want to run that code, which is contained in a script, just type the name of the .m file without the 'load' command


Community Treasure Hunt

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

Start Hunting!