Number of columns on line 2 of ASCII file [ ].m must be the same as previous lines.
조회 수: 1 (최근 30일)
이전 댓글 표시
Here is my code:
figure;
t = linspace(0,2*pi,100);
plot(t,sin(t));
hold on;
plot(t,cos(t),'--');
xlabel('x');
ylabel('function value');
legend('sin(x)','cos(x)');
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.
댓글 수: 0
답변 (1개)
Henry Giddens
2017년 9월 18일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!