Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

a general simulink doubt not related to electrical engineering

Status
Not open for further replies.

maarich

Newbie level 2
Joined
May 18, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
hi
i have actually written a code which uses syms function.I want to use this code in simulink,but there seems to be a problem. Is there any alternative for syms function in simulink??.please help....
my code is:
function [CL] = attack(m,h,v,s,alpha0)
clc
syms x;
CL=zeros(300,1);
AOA=zeros(300,1);
ro=zeros(300,1);
for i=1:300
ro(i)=1.225.*((1-(.0065.*h(i)./288.15)).^4.258644);
AOA(i,1)=solve((0.5.*ro(i).*v(i).*v(i).*s.*.1.*(x-alpha0))-(m.*9.81.*cos(x.*pi./180)));
AOA(i,1)=AOA(i,1).*1;
end
 

atleast sumone please reply
 

simulink ports matlab code so I don;t see a problem with using symbolics. Unless the function is not in your workspace or you have not defined the symbol "x".
without syms x:
another way you could write it is : AOA(i,1)=solve((0.5.*ro(i).*v(i).*v(i).*s.*.1.*(x-alpha0))-(m.*9.81.*cos(x.*pi./180)),x);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top