Hi everyone i'm new to matlab can anyone help me to solve the equations listed in the image using matlab functions .whenever i'm trying to solving it is showing error and more ever can anyone tell is it correct way to solve these equations

1 visualización (últimos 30 días)
  3 comentarios
Rajavardhan
Rajavardhan el 14 de Feb. de 2015
Editada: Rajavardhan el 14 de Feb. de 2015
I tried it by removing line #2 but also it is showing error as alpha dele and n are undefined variables and i'm actually using this code in matlab function block in simulink with V D and rho as input to get alpha dele and n as output
function[alpha,dele,n] = trimalgorithm(V,D,rho)
CD=0.08712-(0.05593*alpha)+(3.4825*alpha^2)+(0.2258*dele^2)+(0.1471*dele);
CL=0.1748+(2.453*alpha)-(1.691*alpha^2)+(29.986*alpha^3)-(49.245*alpha^4)-(0.3638*dele^2)+(0.7405*dele);
Jad=V/(n*D);
qdyn=0.5*rho*V^2;
I=4/(pi*pi)*rho^2*n^2*D^4;
T=I*(-0.0948*Jad^2+0.058*Jad+0.0761);
eqn1=-CD*qdyn*0.0618+T*cos(alpha)==0;
eqn2=-CL*qdyn*0.0618+T*sin(alpha)+2.943==0;
eqn3=0.0385-(0.59977*alpha)-(1.27402*alpha^2)-(0.1587*dele^2)-(0.4106*dele)==0;
[alpha,dele,n]=solve(eqn1,eqn2,eqn3,alpha,dele,n);
end
Star Strider
Star Strider el 14 de Feb. de 2015
I didn’t pick up on its being a Simulink model. I added that to the product tags so someone proficient in Simulink will see it.

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 14 de Feb. de 2015
Simply get rid of the line that says "double ....." That is not MATLAB syntax and you don't need to declare variables in advance. But you do need to define values for alpha, dele, and n.
  1 comentario
Rajavardhan
Rajavardhan el 14 de Feb. de 2015
Editada: Rajavardhan el 14 de Feb. de 2015
actually i need to find the values of alpha dele and n by giving V D rho as input and more ever i'm using matlab function block to solve these everytime it is showing parse error

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by