Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

engineering formula solve - "index exceeds array bounds"

1 visualización (últimos 30 días)
Richard Gray
Richard Gray el 28 de Mzo. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello,
this is a rework of a question i'd asked previously; my old cold ended up working fine with help, but my initial algebra was incorrect (multiple terms in denominator). I've re-worked the algebra, but get different error when plotting the equation - here's the code;
clear
clc
%initial parameters
%axial case
r = 1e-3;
d = 0.5e-3;
l = 2e-3;
mu = 0.6;
%equations
P = 200000:100000:2700000;
s = P*r/(2*(r-d));
g = s/2;
Y = ((3*(r^2)*s) - 3*(d^2)*((P)-s))/(2*l*mu(d*g-g*r+3*(P)*r));
plot(Y,P)
Index exceeds array bounds.
Error in iepattempt2 (line 20)
Y = ((3*(r^2)*s) - 3*(d^2)*((P)-s))/(2*l*mu(d*g-g*r+3*(P)*r));
Any assistance is appreciated once more,
Rich
  1 comentario
madhan ravi
madhan ravi el 28 de Mzo. de 2019
Editada: madhan ravi el 28 de Mzo. de 2019
Y = ((3*(r^2)*s) - 3*(d^2)*((P)-s))./(2*l*mu*(d*g-g*r+3*(P)*r));
% ^--------^------missing

Respuestas (0)

La pregunta está cerrada.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by