Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Help me draw a ODE solution in Matlab

Status
Not open for further replies.

david753

Full Member level 1
Joined
Jan 9, 2005
Messages
96
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
856
If a ODE's answer is sqrt(y^2-1)/y=C*Exp(x), C in constant number.
How can I draw it in mathlab?
 

rrumpf

Full Member level 5
Joined
Jul 6, 2007
Messages
288
Helped
66
Reputation
132
Reaction score
43
Trophy points
1,308
Location
El Paso, TX
Activity points
3,545
Re: answer of O.D.E

The trick I think is to solve this for x. Try this code...

clf; hold on;
Y = linspace(-4,4,10000);
C = [1:5];
COL = { 'r' 'g' 'b' 'c' 'k' };
L = {};
NC = length(C);
for nc = 1 : NC
X = log(sqrt(Y.^2 - 1)/C(nc)./Y);
plot(X,Y,COL{nc});
L{nc} = ['C = ' num2str(C(nc))];
end
hold off;
legend(L);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top