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:
plotting multivariables from an excel data sheet

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 00:04:04

Message: 1 of 18

Hi all,

I have some experimental data with three variables I would like to plot, but I am having trouble figuring it all out. v1, v2, and V are my variables. v1 represents voltage ranging from 0-5 while v2 represents voltage from 5-0 and V is the output voltage produced from the combination of the two...For example v1 = 0, v2 = 5, V = -7.53...The next entry would be v1 = 0, v2 = 4, V = -6.05...next v1 = 0, v2 = 3, V = -4.54, and so on...Please any help will be much apperciated its been awhile since I have used matlab so I have forgotten alot it would seem.

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 00:27:03

Message: 2 of 18

Here is my code thus far, I know this is a terrible way of going about this problem, but this is what my approach looks like so far.

How can I get these to plot?

%% multiple variable plotting system
% Will plot multiple variable arrays on a graph

values = {0, 5, -7.53; 0, 4, -6.05; 0, 3, -4.54; 0, 2, -3.07; 0, 1, -1.51;...
    1, 5, -8.03; 1, 4, -6.56; 1, 3, -5.03; 1, 2, -3.54; 1, 1, -2.02;...
    1, 0, -0.49; 2, 5, -8.51; 2, 4, -7.09; 2, 3, -5.54;2, 2, -4.00;...
    2, 1, -2.50; 2, 0, -0.99; 3,5,-9.06; 3, 4, -7.53; 3, 3, -6.08;...
    3, 2, -4.56; 3, 1, -3.00; 3, 0, -1.48; 4, 5, -9.54; 4, 4, -8.04;...
    4, 3, -6.52; 4, 2, -5.02; 4, 1, -3.56; 4, 0, -1.98; 5, 5, -10.10;...
    5, 4, -8.62; 5, 3, -7.07; 5, 2, -5.51; 5, 1, -4.04; 5, 0, -2.50};
headers = {'voltage Source 1', 'voltage source 2', 'Output Voltage'};

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 00:41:03

Message: 3 of 18

I have tried another way with no success.

%%
v1 = {0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
    5,5,5,5,5,5}
v2 = {5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0;...
    5,4,3,2,1,0;}
V = {-7.53,-6.05,-4.54,-3.07,-1.51,0,-8.03,-6.56,-5.03,-3.54,-2.02,-0.49,...
-8.51,-7.09,-5.54,-4.00,-2.50,-0.99,-9.06,-7.53,-6.08,-4.56,-3.00,-1.48,...
-9.54,-8.04,-6.52,-5.02,-3.56,-1.98,-10.10,-8.62,-7.07,-5.51,-4.04,-2.50}

plot(v1, v2, V)

ERROR ??? Error using ==> plot
Conversion to double from cell is not possible.
 

Subject: plotting multivariables from an excel data sheet

From: TideMan

Date: 29 Nov, 2010 00:42:32

Message: 4 of 18

On Nov 29, 1:27 pm, "William " <william.bax...@oit.edu> wrote:
> Here is my code thus far, I know this is a terrible way of going about this problem, but this is what my approach looks like so far.
>
> How can I get these to plot?
>
> %% multiple variable plotting system
> % Will plot multiple variable arrays on a graph
>
> values = {0, 5, -7.53; 0, 4, -6.05; 0, 3, -4.54; 0, 2, -3.07; 0, 1, -1.51;...
>     1, 5, -8.03; 1, 4, -6.56; 1, 3, -5.03; 1, 2, -3.54; 1, 1, -2.02;...
>     1, 0, -0.49; 2, 5, -8.51; 2, 4,     -7.09; 2, 3, -5.54;2, 2, -4.00;...
>     2, 1, -2.50; 2, 0, -0.99; 3,5,-9.06; 3, 4, -7.53; 3, 3, -6.08;...
>     3, 2, -4.56; 3, 1, -3.00; 3, 0, -1.48; 4, 5, -9.54; 4, 4, -8.04;...
>     4, 3, -6.52; 4, 2, -5.02; 4, 1, -3.56; 4, 0, -1.98; 5, 5, -10.10;...
>     5, 4, -8.62; 5, 3, -7.07; 5, 2, -5.51; 5, 1, -4.04; 5, 0, -2.50};
> headers = {'voltage Source 1', 'voltage source 2', 'Output Voltage'};

Do you mean to say that you've typed these numbers into Matlab from an
Excel file?
Why didn't you simply use:
[a,b]=xlsread(xlsfile);
where xlsfile is the filename, something like:
xlsfile='d:\MyData\Excel File of Voltages.xls';

Now:
headers=b(1,:);
and a is a matrix of your data.
To plot Output Voltage as a function of Voltage Source 1 you would do
this:
plot(a(:,1),a(:,3),'bo')

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 00:57:03

Message: 5 of 18

Hey,

Thanks for the response, I have tried this way and it doesnt want to find the excel file even though I have specified it correctly this is the file location:

 C:\Users\BJ\Desktop\School\Electrical Circuits I\LAB

Does matlab not like spaces? maybe i need to rename the file so it doesnt have spaces in it?

Also, I am trying to plot Voltage Output as a function of both v1 and v2.

I really apperciate the help and sorry if I am misunderstanding

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 01:28:36

Message: 6 of 18

So you have two problems:
1) How to read from an existing Excel workbook, and
2) How to plot, assuming you did have values already imported into
Excel.

For (1), try using fullfile() and exist() and see if you are actually
reading the file you think you are.
For (2), try this:

v1 = {0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3;
4,4,4,4,4,4;...
    5,5,5,5,5,5}
v2 = {5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0;
5,4,3,2,1,0;...
    5,4,3,2,1,0;}
V =
{-7.53,-6.05,-4.54,-3.07,-1.51,0,-8.03,-6.56,-5.03,-3.54,-2.02,-0.49,...
-8.51,-7.09,-5.54,-4.00,-2.50,-0.99,-9.06,-7.53,-6.08,-4.56,-3.00,-1.48,...
-9.54,-8.04,-6.52,-5.02,-3.56,-1.98,-10.10,-8.62,-7.07,-5.51,-4.04,-2.50}
% The above are cells. Convert to numerical arrays before plotting.
plot(cell2mat(v1));
hold on;
plot(cell2mat(v2));
plot(cell2mat(V));

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 01:44:04

Message: 7 of 18

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <633573aa-9769-45ae-adfb-4e9c317c6bfb@p38g2000vbn.googlegroups.com>...
> So you have two problems:
> 1) How to read from an existing Excel workbook, and
> 2) How to plot, assuming you did have values already imported into
> Excel.
>
> For (1), try using fullfile() and exist() and see if you are actually
> reading the file you think you are.
> For (2), try this:
>
> v1 = {0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3;
> 4,4,4,4,4,4;...
> 5,5,5,5,5,5}
> v2 = {5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0;
> 5,4,3,2,1,0;...
> 5,4,3,2,1,0;}
> V =
> {-7.53,-6.05,-4.54,-3.07,-1.51,0,-8.03,-6.56,-5.03,-3.54,-2.02,-0.49,...
> -8.51,-7.09,-5.54,-4.00,-2.50,-0.99,-9.06,-7.53,-6.08,-4.56,-3.00,-1.48,...
> -9.54,-8.04,-6.52,-5.02,-3.56,-1.98,-10.10,-8.62,-7.07,-5.51,-4.04,-2.50}
> % The above are cells. Convert to numerical arrays before plotting.
> plot(cell2mat(v1));
> hold on;
> plot(cell2mat(v2));
> plot(cell2mat(V));


Hello, Thanks for the help this does allow me to plot the data but not as I wished. What I would like is to have v1 say on the left y-axis v2 on the right y-axis and V would be plotted as a function of both on the x-axis.

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 01:51:30

Message: 8 of 18

Try plotyy().

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 02:02:04

Message: 9 of 18

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <a2f5f82c-b573-400a-97d9-cd2ba4d66464@32g2000yqz.googlegroups.com>...
> Try plotyy().

I apperciate your patience and help! here is what I have and the error I run into...

%%
v1 = [0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
    5,5,5,5,5,5]
v2 = [5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0; 5,4,3,2,1,0;...
    5,4,3,2,1,0]
V = [-7.53,-6.05,-4.54,-3.07,-1.51,0; -8.03,-6.56,-5.03,-3.54,-2.02,-0.49;...
-8.51,-7.09,-5.54,-4.00,-2.50,-0.99;-9.06,-7.53,-6.08,-4.56,-3.00,-1.48;...
-9.54,-8.04,-6.52,-5.02,-3.56,-1.98;-10.10,-8.62,-7.07,-5.51,-4.04,-2.50]
plotyy(v1, v2, V);

ERROR:
??? Error using ==> plotyy at 36
Not enough input arguments.

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 02:53:29

Message: 10 of 18

Well you didn't read the documentation for plotyy, did you?
"plotyy(X1,Y1,X2,Y2)"
So what are your (X1,Y1,X2,Y2) when you say "plotyy(v1, v2, V); "?

Anyway I'm not sure what you mean. You can plot two sets of numbers,
each with a different Y axis scaling, but you have to give the
corresponding X values for each. OK, fine - that will let you plot v1
and v2, with X1 being 1:length(v1) and X2 being1:length(v2). But I
really don't know what you mean at all when you say "V would be
plotted as a function of both on the x-axis. " What does that mean?
Normally you plot the Y value for the corresponding X value, but your
sentence is totally confusing to me. How are you going to plot an
array of numbers "on the x axis"???

Subject: plotting multivariables from an excel data sheet

From: TideMan

Date: 29 Nov, 2010 03:06:32

Message: 11 of 18

On Nov 29, 3:53 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> Well you didn't read the documentation for plotyy, did you?
> "plotyy(X1,Y1,X2,Y2)"
> So what are your (X1,Y1,X2,Y2) when you say "plotyy(v1, v2, V); "?
>
> Anyway I'm not sure what you mean.  You can plot two sets of numbers,
> each with a different Y axis scaling, but you have to give the
> corresponding X values for each.  OK, fine - that will let you plot v1
> and v2, with X1 being 1:length(v1) and X2 being1:length(v2).  But I
> really don't know what you mean at all when you say "V would be
> plotted as a function of both on the x-axis. "  What does that mean?
> Normally you plot the Y value for the corresponding X value, but your
> sentence is totally confusing to me.  How are you going to plot an
> array of numbers "on the x axis"???

ImageAnalyst:
I suspect William has not thought through what he's trying to do.
Why does he need to have v1 and v2 on different axes?
It doesn't make any sense. From his description, they are all inter-
related.
You only need to use plotyy if you're plotting oranges and lemons as a
function of a common independent variable.
In his case, he's plotting the two independent variables against the
dependent variable, which is arse about face, of course, but he needs
to figure that out for himself.

To get going, he should simply do this:
plot(V,v1,'bo',V,v2,'rs')

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 03:16:03

Message: 12 of 18

First I want to thank you agian for your help Sorry I didnt post earlier about where I am currently stuck. I'll try to explain this the best I can...The script written below plots v1 on the left y-axis from 0 - 5 and v2 on the right axis from 0-5. I would like the right y-axis
to be from 5-0, and I would like to see a single plot representing V on the x-axis. I have tried to enter v2' to transpose the right y-axis, but that doesnt transpose as I would think. Thanks in advance for any further insight.

%%
v1 = [0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
    5,5,5,5,5,5]
v2 = [0,1,2,3,4,5; 0,1,2,3,4,5;0,1,2,3,4,5;0,1,2,3,4,5;...
    0,1,2,3,4,5;0,1,2,3,4,5;]
V = [-7.53,-6.05,-4.54,-3.07,-1.51,0; -8.03,-6.56,-5.03,-3.54,-2.02,-0.49;...
-8.51,-7.09,-5.54,-4.00,-2.50,-0.99;-9.06,-7.53,-6.08,-4.56,-3.00,-1.48;...
-9.54,-8.04,-6.52,-5.02,-3.56,-1.98;-10.10,-8.62,-7.07,-5.51,-4.04,-2.50]
plotyy(V,v1,V,v2')

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 03:29:23

Message: 13 of 18

I still have no idea what this means "I would like to see a single
plot representing V on the x-axis. " Do you mean that V is the X
values that applies to both v1 and v2? Or do you mean that you need a
third plot - a third line curve being a plot of V in addition to your
existing plots of v1 and v2?

You can fiddle with the ydir property to flip an axis. Not sure how
it would work if you used plotyy and just wanted to flip one of the
two axes though. However if you wanted to plot v1 and v2 on the same
y scale, then I think you could use something like
set(gca,'YDir','reverse')
just after you call plot() or plotyy().

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 03:31:07

Message: 14 of 18

On Nov 28, 10:06 pm, TideMan <mul...@gmail.com> wrote:
> ImageAnalyst:
> I suspect William has not thought through what he's trying to do.

> To get going, he should simply do this:
> plot(V,v1,'bo',V,v2,'rs')
----------------------------------------------
I agree. However I'm still trying to get out of him if V contains the
x values for v1 and v2 or if it's some third set of data and all 3
sets need to be plotted against the index number.

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 03:57:03

Message: 15 of 18

TideMan <mulgor@gmail.com> wrote in message <d7d84d02-da35-4076-9cff-7197f9c917ec@r19g2000prm.googlegroups.com>...
> On Nov 29, 3:53 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> > Well you didn't read the documentation for plotyy, did you?
> > "plotyy(X1,Y1,X2,Y2)"
> > So what are your (X1,Y1,X2,Y2) when you say "plotyy(v1, v2, V); "?
> >
> > Anyway I'm not sure what you mean.  You can plot two sets of numbers,
> > each with a different Y axis scaling, but you have to give the
> > corresponding X values for each.  OK, fine - that will let you plot v1
> > and v2, with X1 being 1:length(v1) and X2 being1:length(v2).  But I
> > really don't know what you mean at all when you say "V would be
> > plotted as a function of both on the x-axis. "  What does that mean?
> > Normally you plot the Y value for the corresponding X value, but your
> > sentence is totally confusing to me.  How are you going to plot an
> > array of numbers "on the x axis"???
>
> ImageAnalyst:
> I suspect William has not thought through what he's trying to do.
> Why does he need to have v1 and v2 on different axes?
> It doesn't make any sense. From his description, they are all inter-
> related.
> You only need to use plotyy if you're plotting oranges and lemons as a
> function of a common independent variable.
> In his case, he's plotting the two independent variables against the
> dependent variable, which is arse about face, of course, but he needs
> to figure that out for himself.
>
> To get going, he should simply do this:
> plot(V,v1,'bo',V,v2,'rs')

First thank you to people trying to HELP but just reading enough to flame
the author is a demonstration of supreme ignorance.
This is a forum to learn? or to be harassed? Let me try to better explain

first plotted point is: v1 = 0, v2=0, V=0
NEXT POINT v1 = 0, v2= 1, V = -7.53
NEXT POINT v1 = 0, v2= 2, V = -6.05 .... v1 remains 0, and this continues until v2 = 5
NEXT POINT v1 = 1, v2= 0, V = -0.49 .... v1 remains 1, and this continues until v2 = 5
NEXT POINT v1 = 2, v2 = 0, V= -0.99 ... v1 remains 2, and this continues until v2=5
V is dependant on a change in both v1 and v2


%%
v1 = [0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
    5,5,5,5,5,5]
v2 = [0,1,2,3,4,5; 0,1,2,3,4,5;0,1,2,3,4,5;0,1,2,3,4,5;...
    0,1,2,3,4,5;0,1,2,3,4,5;]
V = [-7.53,-6.05,-4.54,-3.07,-1.51,0; -8.03,-6.56,-5.03,-3.54,-2.02,-0.49;...
-8.51,-7.09,-5.54,-4.00,-2.50,-0.99;-9.06,-7.53,-6.08,-4.56,-3.00,-1.48;...
-9.54,-8.04,-6.52,-5.02,-3.56,-1.98;-10.10,-8.62,-7.07,-5.51,-4.04,-2.50]
plotyy(V,v1,V,v2')

Subject: plotting multivariables from an excel data sheet

From: ImageAnalyst

Date: 29 Nov, 2010 04:17:41

Message: 16 of 18

How about this:
surf(reshape(V, [6 6]));

That's it for tonight - I'm off to bed.

Subject: plotting multivariables from an excel data sheet

From: TideMan

Date: 29 Nov, 2010 07:19:22

Message: 17 of 18

On Nov 29, 4:57 pm, "William " <william.bax...@oit.edu> wrote:
> TideMan <mul...@gmail.com> wrote in message <d7d84d02-da35-4076-9cff-7197f9c91...@r19g2000prm.googlegroups.com>...
> > On Nov 29, 3:53 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> > > Well you didn't read the documentation for plotyy, did you?
> > > "plotyy(X1,Y1,X2,Y2)"
> > > So what are your (X1,Y1,X2,Y2) when you say "plotyy(v1, v2, V); "?
>
> > > Anyway I'm not sure what you mean.  You can plot two sets of numbers,
> > > each with a different Y axis scaling, but you have to give the
> > > corresponding X values for each.  OK, fine - that will let you plot v1
> > > and v2, with X1 being 1:length(v1) and X2 being1:length(v2).  But I
> > > really don't know what you mean at all when you say "V would be
> > > plotted as a function of both on the x-axis. "  What does that mean?
> > > Normally you plot the Y value for the corresponding X value, but your
> > > sentence is totally confusing to me.  How are you going to plot an
> > > array of numbers "on the x axis"???
>
> > ImageAnalyst:
> > I suspect William has not thought through what he's trying to do.
> > Why does he need to have v1 and v2 on different axes?
> > It doesn't make any sense.  From his description, they are all inter-
> > related.
> > You only need to use plotyy if you're plotting oranges and lemons as a
> > function of a common independent variable.
> > In his case, he's plotting the two independent variables against the
> > dependent variable, which is arse about face, of course, but he needs
> > to figure that out for himself.
>
> > To get going, he should simply do this:
> > plot(V,v1,'bo',V,v2,'rs')
>
> First thank you to people trying to HELP but just reading enough to flame
> the author is  a demonstration of supreme ignorance.
> This is a forum to learn? or to be harassed? Let me try to better explain
>
> first plotted point is: v1 = 0, v2=0, V=0
> NEXT POINT v1 = 0, v2= 1, V = -7.53
> NEXT POINT v1 = 0, v2= 2, V = -6.05 .... v1 remains 0, and this continues until v2 = 5
> NEXT POINT v1 = 1, v2= 0, V = -0.49 .... v1 remains 1, and this continues until v2 = 5
> NEXT POINT v1 = 2, v2 = 0, V= -0.99 ... v1 remains 2, and this continues until v2=5
> V is dependant on a change in both v1 and v2
>
> %%
> v1 = [0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
>     5,5,5,5,5,5]
> v2 = [0,1,2,3,4,5; 0,1,2,3,4,5;0,1,2,3,4,5;0,1,2,3,4,5;...
>     0,1,2,3,4,5;0,1,2,3,4,5;]
> V = [-7.53,-6.05,-4.54,-3.07,-1.51,0; -8.03,-6.56,-5.03,-3.54,-2.02,-0.49;...
> -8.51,-7.09,-5.54,-4.00,-2.50,-0.99;-9.06,-7.53,-6.08,-4.56,-3.00,-1.48;...
> -9.54,-8.04,-6.52,-5.02,-3.56,-1.98;-10.10,-8.62,-7.07,-5.51,-4.04,-2.50]
> plotyy(V,v1,V,v2')

Do you feel that I "flamed" you?
Believe me, if I had intended to flame you, I would have made a better
job of it than that.
What you got was the result of poor explanation by you of your
problem.
Neither ImageAnalyst nor I can figure out what you are on about.
Until you can explain what it is that you're trying to do in language
that people can understand, you'll get nowhere.

Subject: plotting multivariables from an excel data sheet

From: William

Date: 29 Nov, 2010 07:58:04

Message: 18 of 18

TideMan <mulgor@gmail.com> wrote in message <4c70f0f7-e7f9-4116-b54a-21cda0c7edca@r40g2000prh.googlegroups.com>...
> On Nov 29, 4:57 pm, "William " <william.bax...@oit.edu> wrote:
> > TideMan <mul...@gmail.com> wrote in message <d7d84d02-da35-4076-9cff-7197f9c91...@r19g2000prm.googlegroups.com>...
> > > On Nov 29, 3:53 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> > > > Well you didn't read the documentation for plotyy, did you?
> > > > "plotyy(X1,Y1,X2,Y2)"
> > > > So what are your (X1,Y1,X2,Y2) when you say "plotyy(v1, v2, V); "?
> >
> > > > Anyway I'm not sure what you mean.  You can plot two sets of numbers,
> > > > each with a different Y axis scaling, but you have to give the
> > > > corresponding X values for each.  OK, fine - that will let you plot v1
> > > > and v2, with X1 being 1:length(v1) and X2 being1:length(v2).  But I
> > > > really don't know what you mean at all when you say "V would be
> > > > plotted as a function of both on the x-axis. "  What does that mean?
> > > > Normally you plot the Y value for the corresponding X value, but your
> > > > sentence is totally confusing to me.  How are you going to plot an
> > > > array of numbers "on the x axis"???
> >
> > > ImageAnalyst:
> > > I suspect William has not thought through what he's trying to do.
> > > Why does he need to have v1 and v2 on different axes?
> > > It doesn't make any sense.  From his description, they are all inter-
> > > related.
> > > You only need to use plotyy if you're plotting oranges and lemons as a
> > > function of a common independent variable.
> > > In his case, he's plotting the two independent variables against the
> > > dependent variable, which is arse about face, of course, but he needs
> > > to figure that out for himself.
> >
> > > To get going, he should simply do this:
> > > plot(V,v1,'bo',V,v2,'rs')
> >
> > First thank you to people trying to HELP but just reading enough to flame
> > the author is  a demonstration of supreme ignorance.
> > This is a forum to learn? or to be harassed? Let me try to better explain
> >
> > first plotted point is: v1 = 0, v2=0, V=0
> > NEXT POINT v1 = 0, v2= 1, V = -7.53
> > NEXT POINT v1 = 0, v2= 2, V = -6.05 .... v1 remains 0, and this continues until v2 = 5
> > NEXT POINT v1 = 1, v2= 0, V = -0.49 .... v1 remains 1, and this continues until v2 = 5
> > NEXT POINT v1 = 2, v2 = 0, V= -0.99 ... v1 remains 2, and this continues until v2=5
> > V is dependant on a change in both v1 and v2
> >
> > %%
> > v1 = [0,0,0,0,0,0; 1,1,1,1,1,1; 2,2,2,2,2,2; 3,3,3,3,3,3; 4,4,4,4,4,4;...
> >     5,5,5,5,5,5]
> > v2 = [0,1,2,3,4,5; 0,1,2,3,4,5;0,1,2,3,4,5;0,1,2,3,4,5;...
> >     0,1,2,3,4,5;0,1,2,3,4,5;]
> > V = [-7.53,-6.05,-4.54,-3.07,-1.51,0; -8.03,-6.56,-5.03,-3.54,-2.02,-0.49;...
> > -8.51,-7.09,-5.54,-4.00,-2.50,-0.99;-9.06,-7.53,-6.08,-4.56,-3.00,-1.48;...
> > -9.54,-8.04,-6.52,-5.02,-3.56,-1.98;-10.10,-8.62,-7.07,-5.51,-4.04,-2.50]
> > plotyy(V,v1,V,v2')
>
> Do you feel that I "flamed" you?
> Believe me, if I had intended to flame you, I would have made a better
> job of it than that.
> What you got was the result of poor explanation by you of your
> problem.
> Neither ImageAnalyst nor I can figure out what you are on about.
> Until you can explain what it is that you're trying to do in language
> that people can understand, you'll get nowhere.



Very interesting concept to provide feedback which states you cannnot understand what it is im asking, but no feedback as to what it is you dont understand. Dont speak for ImageAnalyst as I do believe he understands what im trying to do. His help has gotten me closer. The plotyy command has been discussed as very confusing by many matlab users. So, what is it you dont understand? v1 and v2 vary from 0-5 and 5-0 as v1 and v2 are "turned up" or "turned down" the variable V changes. V is affected by both v1 AND v2, you stated earlier that I should plot it as though v1 and V are one plot and v2 and V are another plot, this obviously is not the case as v1 and v2 are both contributing to the change in V. Thanks in advance for any helpful comments.

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