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 Ansicht (letzte 30 Tage)
  3 Kommentare
Rajavardhan
Rajavardhan am 14 Feb. 2015
Bearbeitet: Rajavardhan am 14 Feb. 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 am 14 Feb. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 14 Feb. 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 Kommentar
Rajavardhan
Rajavardhan am 14 Feb. 2015
Bearbeitet: Rajavardhan am 14 Feb. 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

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by