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.

how can I plot into matlab

Status
Not open for further replies.

negar

Newbie level 2
Joined
May 7, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
hello all
I want to write matlab cod for :

x=10:1:20;


.5*pi*(1.5^2)[0.00333*(1.5*y/x)+0.00433*((1.5*y/x)^3)-7.26e-5((1.5*y/x)^5)]*x^3=1250;
plot(y,x)
 

The trouble with your code is that the argument in the second line is a bit off syntax-wise. Try to simplify it by breaking the calculation up into 2 lines for clarity.

Plotting example:

t = 1790:10:2000;
P = 197273000./(1+exp(-0.03134*(t-1913.25)));
plot (t,P);
 

there are various ways to plot this in MATLAB:
1. u can use the symbolic tool box
2. u cn use the anonymous function

it depends on the one that u want
well let use the editor by typing edit at the command prompt;
the editor opens
now type
x=10:1:20;
5*pi*(1.5^2)*[0.00333*(1.5*y/x)+0.00433*((1.5*y/x)^3)-7.26e-5*((1.5*y/x)^5)]*x^3=1250;
find(y) or pretty(y) u can also use feval
then u plot(x,y)
as at now i am talking a wild guess but i will solve this when i get home and resend you the correct solution.
 

to write this program you must forst simplify the equation to
y=[[5*pi*(1.5^2)*[0.00333*(1.5/x)+0.00433*((1.5/x)^3)-7.26e-5*((1.5/x)^5)]*x^3]/1250]^-1;
you don't have to write the step that you want to use for " x=10:1:20 "
so the program will be like this
x=10:20;
y=[[5*pi*(1.5^2)*[0.00333*(1.5/x)+0.00433*((1.5/x)^3)-7.26e-5*((1.5/x)^5)]*x^3]/1250]^-1;
plot(x,y)

I hope that this is the answer you are looking for

cheers
 

You should find y values by fsolve function and then use plot.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top