From: CNN on 10 May 2010 06:20 I have the x, y and z coordinates of a particle at different times in a matrix and I plotted them on a graph plot3(point(:,1),point(:,2),point(:,3)) However, I need the x and z axis to switch positions i.e. the x axis should be the vertical one while the z axis the right hand axis. Is there a way to write a code to do this? The above code is in an m-file and I want to add that option to the file.
From: Joshua Arnott on 10 May 2010 06:28 "CNN " <cnln2000(a)yahoo.co.uk> wrote in message <hs8ml7$r3$1(a)fred.mathworks.com>... > I have the x, y and z coordinates of a particle at different times in a matrix and I plotted them on a graph > > plot3(point(:,1),point(:,2),point(:,3)) > > However, I need the x and z axis to switch positions i.e. the x axis should be the vertical one while the z axis the right hand axis. Is there a way to write a code to do this? The above code is in an m-file and I want to add that option to the file. swapAxis = true; % modify to suit if(swapAxis) plot3(point(:,3),point(:,2),point(:,1)) else plot3(point(:,1),point(:,2),point(:,3)) end Do I misunderstand? J.
From: CNN on 10 May 2010 11:47 "Joshua Arnott" <j.arnott(a)lancs.ac.uk.matlab> wrote in message <hs8n3m$t48$1(a)fred.mathworks.com>... > "CNN " <cnln2000(a)yahoo.co.uk> wrote in message <hs8ml7$r3$1(a)fred.mathworks.com>... > > I have the x, y and z coordinates of a particle at different times in a matrix and I plotted them on a graph > > > > plot3(point(:,1),point(:,2),point(:,3)) > > > > However, I need the x and z axis to switch positions i.e. the x axis should be the vertical one while the z axis the right hand axis. Is there a way to write a code to do this? The above code is in an m-file and I want to add that option to the file. > > swapAxis = true; % modify to suit > if(swapAxis) > plot3(point(:,3),point(:,2),point(:,1)) > else > plot3(point(:,1),point(:,2),point(:,3)) > end > > Do I misunderstand? > > J. Hi, The code didn't work. I need the x values to plot along the vertical axis. The code didn't change anything.
|
Pages: 1 Prev: embedded matlab help Next: percision in matlab command imdivide |