Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: how to plot two vectors as two columns next to each other
Replies: 7   Last Post: Sep 26, 2012 1:01 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt

Posts: 10
Registered: 9/17/12
Re: how to plot two vectors as two columns next to each other
Posted: Sep 25, 2012 10:47 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

TideMan <mulgor@gmail.com> wrote in message <e5fd67bc-b90e-4f2b-b6c4-dcb44ad8433d@googlegroups.com>...
> On Wednesday, September 26, 2012 1:47:08 PM UTC+12, Matt wrote:
> > dpb <none@non.net> wrote in message <k3tmkl$p0i$1@speranza.aioe.org>...
> >

> > > On 9/25/2012 7:55 PM, Matt wrote:
> >
> > > > I have 2 number vectors of length 10. I want to display them side by
> >
> > > > side with a heading of each right above them. I want it to pretty much
> >
> > > > make it look like a table with two values side by side. Any simple way
> >
> > > > to do this?
> >
> > >
> >
> > > Probably if I could figure out what it really is you wanted... :)
> >
> > >
> >
> > > What is a plot of two columns? What about
> >
> > >
> >
> > > doc bar % maybe?
> >
> > >
> >
> > > --
> >
> > O shoot, I meant to say display not plot

>
> Here's one way:
> fprintf(1,'Header 1\tHeader 2\n');
> fprintf(1,'%f\t%f\n',[Vector1 Vector2]');
>
> Note the transpose of the matrix formed by the two vectors.

hmm this did something close. lets say I have z=[1 2 3 4 5 6 7 8 9 10] and b = [.1 .2 .3 .4 .5 .6 .7 .8 .9 1]

it gives me this:
1 2
3 4
5 6
7 8
9 10
.1 .2
.3 .4
.5 .6
.7 .8
.9 1

i want all z be in column 1 and b be in column two.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.