why do i keep getting index exceeds matirx dimensions?
Afficher commentaires plus anciens
I just typed in simple codes for plotting a graph and i keep getting the same error why is that?
d=1:1:10
theta=pi/4;
Dc= d/2.*(1-cos(theta));
Q= (2.^(3/2).*Dc.^(5/2).*sqrt(g).*(theta-0.5.*sin(2.*theta)).^(3/2))/(8.*sqrt (sin(theta).*(1-cos(theta).^(5/2))))
subplot (2,1,2);
plot (d,Q)
title('17473981')
xlabel('diameter')
ylabel('flow rate')
grid on
Réponse acceptée
Plus de réponses (1)
Rick Rosson
le 1 Avr 2012
0 votes
Please post the exact error message and indicate which line is triggering the error.
3 commentaires
parsh
le 1 Avr 2012
Image Analyst
le 1 Avr 2012
Funny - I get "Undefined function or variable 'g'."
parsh
le 1 Avr 2012
Catégories
En savoir plus sur Matrix Indexing 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!