Newbie question about example on a textbook
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!