Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to plot the ratio of two variables in single axis?

Subject: how to plot the ratio of two variables in single axis?

From: Dinesh Kumar Kala Sekar

Date: 25 Jun, 2010 20:25:32

Message: 1 of 4

Hi all, can anybody help me how to plot a 3d surface graph in which x axis for frequency range, y axis for ratio of two variables say Ri/Re and z axis plotted according to the formula

omega=2*pi*f;
r = 1./(1i.*omega.*c);
z =abs(1/(1/Re + 1/( r + Ri)));

here variable c is constant say 10.
the problem is Re and Ri should not be declared as whole value to calculate ratio between them. instead as,

if Ri = Re then value of Ri/Re is 1 this value should be at the mid point of y axis.

if Ri > Re then value of Ri/Re is greater than 1 this value should be at the right side from the mid point of y axis up-to certain range say, till Ri/Re = 10.

if Ri < Re then value of Ri/Re is less than 1 this value should be at the left side from the mid point of y axis up-to certain range say, till Ri/Re = 0.1.

please help me out if anybody knows how to solve this. it would be helpful to carry forward my project work.

Subject: how to plot the ratio of two variables in single axis?

From: Roger Stafford

Date: 25 Jun, 2010 21:48:05

Message: 2 of 4

Dinesh Kumar Kala Sekar <contactdineshraji@gmail.com> wrote in message <1618512900.5126.1277497562574.JavaMail.root@gallium.mathforum.org>...
> Hi all, can anybody help me how to plot a 3d surface graph in which x axis for frequency range, y axis for ratio of two variables say Ri/Re and z axis plotted according to the formula
>
> omega=2*pi*f;
> r = 1./(1i.*omega.*c);
> z =abs(1/(1/Re + 1/( r + Ri)));
>
> here variable c is constant say 10.
> the problem is Re and Ri should not be declared as whole value to calculate ratio between them. instead as,
>
> if Ri = Re then value of Ri/Re is 1 this value should be at the mid point of y axis.
>
> if Ri > Re then value of Ri/Re is greater than 1 this value should be at the right side from the mid point of y axis up-to certain range say, till Ri/Re = 10.
>
> if Ri < Re then value of Ri/Re is less than 1 this value should be at the left side from the mid point of y axis up-to certain range say, till Ri/Re = 0.1.
>
> please help me out if anybody knows how to solve this. it would be helpful to carry forward my project work.
- - - - - - - - - - -
  I think you need to explain your problem with greater care and detail. As it stands, it would appear to be impossible to uniquely determine the z coordinate, knowing only the ratio Ri/Re and frequency f. That is, for a given value of Ri/Re and f, there is an infinitude of possible values for z depending on the individual values of Ri and Re with that ratio.

  To give you a concrete example of what I am saying, suppose that r = 3 and Ri/Re = 2. I say z is not uniquely determined. Let Ri = 2 and Re = 1 and we get z = 5/6. Yet if Ri = 4 and Re = 2, which has the same ratio, then z = 14/9. z is therefore not uniquely determined by Ri/Re and r, and there is no way to make the surface plot you are asking for. z could be any of infinitely many values for the same ratio Ri/Re.

  Note: I realize that your r is pure imaginary, but the above statement of non-uniqueness still holds true nevertheless.

Roger Stafford

Subject: how to plot the ratio of two variables in single axis?

From: Dinesh Kumar Kala Sekar

Date: 28 Jun, 2010 14:15:06

Message: 3 of 4

Thanks for your reply.yes you are rite. Lets take the value Re as 1000 and the value Ri should be changed accordingly say Ri = 2Re,Ri = 3Re,Ri = 4Re...Ri = 10Re and also Ri=1/2Re,Ri=1/3Re,Ri=1/4Re.....Ri=1/10Re. And the variable r is based on variable c, you can find this from the below formula, here we gonna make variable c as constant say 10.
now the concept is ok? if u could do programming on this
please help me over this. because i am completely from bio background as well i am not familiar with programming.


[Hi all, can anybody help me how to plot a 3d surface graph in which x axis for frequency range, y axis for ratio of two variables say Ri/Re and z axis plotted according to the formula

omega=2*pi*f;
r = 1./(1i.*omega.*c);
z =abs(1/(1/Re + 1/( r + Ri)));

here variable c is constant say 10.
the problem is Re and Ri should not be declared as whole value to calculate ratio between them. instead as,

if Ri = Re then value of Ri/Re is 1 this value should be at the mid point of y axis.

if Ri > Re then value of Ri/Re is greater than 1 this value should be at the right side from the mid point of y axis up-to certain range say, till Ri/Re = 10.

if Ri < Re then value of Ri/Re is less than 1 this value should be at the left side from the mid point of y axis up-to certain range say, till Ri/Re = 0.1.

please help me out if anybody knows how to solve this. it would be helpful to carry forward my project work.]

Subject: how to plot the ratio of two variables in single axis?

From: Roger Stafford

Date: 28 Jun, 2010 19:56:04

Message: 4 of 4

Dinesh Kumar Kala Sekar <contactdineshraji@gmail.com> wrote in message <556281418.16869.1277734540834.JavaMail.root@gallium.mathforum.org>...
> Thanks for your reply.yes you are rite. Lets take the value Re as 1000 and the value Ri should be changed accordingly say Ri = 2Re,Ri = 3Re,Ri = 4Re...Ri = 10Re and also Ri=1/2Re,Ri=1/3Re,Ri=1/4Re.....Ri=1/10Re. And the variable r is based on variable c, you can find this from the below formula, here we gonna make variable c as constant say 10.
> now the concept is ok? if u could do programming on this
> please help me over this. because i am completely from bio background as well i am not familiar with programming.
- - - - - - -
  Use meshgrid to make a mesh of the x,y values and compute z according to your formula. With these you would then call on surf.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us