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.

Help me to design graphics with Matlab

Status
Not open for further replies.

aemre

Newbie level 5
Newbie level 5
Joined
Dec 26, 2005
Messages
8
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,377
hi all...i have to design a graphic with matlab.....it s my homework and i need to make this immidiaetly..i wrote some codes but i couldn t see the graphic...

>> A=14,6;
B=365;
pa=(1:1:10);
gama=1/500;
Ud=(B*pa)/log((A*pa)/log(1+(1/gama)));
xlabel(pa);
ylabel(Ud);
plot(pa,Ud);

i have wrote this code.anyone can send me the truest one?so i will see my wrongs...thank u for all...pa changes 1 by 1 from 1 to 10 and changes 10 by 10 from 10 to 100...but i couldn t write this detail...please help me..(pa is a variable)
 

Graphics with Matlab

Hi,
the Ud, is defined as a scalar. here is the truest script, I think so,
A=14.6;
B=365;
pa=(1:1:10);
gama=1/500;
Ud=(B.*pa)./log((A.*pa)./log(1+(1/gama)));
xlabel(pa);
ylabel(Ud);
plot(pa,Ud);
regards
 

Re: Graphics with Matlab

hi...thank you for your commands...but what are those points in the formula of Ud?
for example it is written as (B.*pa)./ it is going on like this...and how can i draw the graphic of Ud when pa is changing between 10 and 100..this must be in the same graphic..pa will come from 1 to 10 then from 10 to 100.but from 10 to 100 it will change 10 by 10...and again thank you very much,and thank you EDABOARD...
have good time with engineering and technicals...
 

Graphics with Matlab

hi,

the dotes positioned in the corrected program means that the operations should be done elemkent wise. it mean that for example the divition must be done on each element of the vector or matrix.
for the case you mentioned it is not clear that what you want to plot. if you want to plot your graph in logarithmic axes use semilogx!!

yours.
 

Re: Graphics with Matlab

thank u,but i am a very newer user of Matlab,so i don t know how to use logx????
can u give me an example?
thanks...
 

Re: Graphics with Matlab

no function with the name "logx" in the matlab
 

Graphics with Matlab

hi,
I'm so sorry.
I have made a mistake.
the correct command as I wrote above is semilogx.
so instead of plot you can use semilogx with the same arguments!!

yours.
 

Re: Graphics with Matlab

there is an example

x=0:10:1e6;
semilogx(x,log10(x));grid;
 

Graphics with Matlab

dear roshdy,

instead of
semilogx(x,log10(x))
you can use loglog(x,x) it plots the same as the above command,

yours.
 

Re: Graphics with Matlab

it is only to give an example to aemre
 

Re: Graphics with Matlab

thank u very much....i am indebuted you..

Added after 1 hours 2 minutes:

sorry....i have wanted to write indebted :) but i couldnt write....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top