Newbie question about example on a textbook
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrices and Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!