Newbie question about example on a textbook
이전 댓글 표시
Hi guys, i just started learning using MATLAB. I am following the "MATLAB for neuroscientist" textbook's examples. I came across this code that won't work:
if true
% code
end
figure
for ii = 1:9
subplot(3,3,ii)
h = bar(1,1)
set(h,'FaceColor',[0 0 ii/9])
end
This code i copied it from the text book in this exact way but when i try to run it it says: Attempt to execute SCRIPT subplot as a function: D:\Program Files\MATLAB\R2013a\bin\subplot.m
Error in subplot (line 3) subplot(3,3,ii)
obviously i can't understand where the problem is, thank you in advance!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!