Prev: Updating positions on points in a plot "on-the-fly"?
Next: how to calculate discrete transfer function
From: Jasmine on 19 Jun 2010 11:00 Hi. This will probably sound mundane but how do I plot a 3D graph with data imported from excel? I have only recently started using MatLab and do not have much knowledge about it apart from some very basic usage. I imported the data and separated them into data1, data2 and data3, without using xlsread though. They are under my Workspace. From there, I tried coding in a script and run it. Let's say data1=x, data2=y, data3=z I tried a few from the internet and the current 1 I am trying like this does not work. [x,y]=meshgrid(data1(1:end),data2(1:end)); z=data3(1:end,1:end); surf(x,y,z); Truth to be told I still do not understand what to enter properly for this section (data(?,:?) or (data(?:?). I take it that it works like excel (but I still get myself confused over it). Is there any other methods for 3D plotting? Any advices? Thanks in advance.
From: us on 19 Jun 2010 11:57 "Jasmine " <j.akabane(a)gmail.com> wrote in message <hvim26$t3r$1(a)fred.mathworks.com>... > Hi. This will probably sound mundane but how do I plot a 3D graph with data imported from excel? > I have only recently started using MatLab and do not have much knowledge about it apart from some very basic usage. > I imported the data and separated them into data1, data2 and data3, without using xlsread though. > They are under my Workspace. > From there, I tried coding in a script and run it. > > Let's say data1=x, data2=y, data3=z > I tried a few from the internet and the current 1 I am trying like this does not work. > > [x,y]=meshgrid(data1(1:end),data2(1:end)); > z=data3(1:end,1:end); > surf(x,y,z); > > Truth to be told I still do not understand what to enter properly for this section (data(?,:?) or (data(?:?). I take it that it works like excel (but I still get myself confused over it). > > Is there any other methods for 3D plotting? > Any advices? > Thanks in advance. a hint: help plot3; help line; us
From: Gang-Gyoo on 20 Jun 2010 07:23 Hi not easy to say something without any information about your data storaged. But, this code may help you. % use this with proper row and column numbers x= reshape(data1,6,4); % for an example, row is 6 and column 4 y= reshape(data2,6,4); z= reshape(data3,6,4); surf(x,y,z)
From: Christopher Rouxel on 15 Jul 2010 16:22 Howdy, check out my file: http://www.mathworks.com/matlabcentral/fileexchange/28177-3d-performance-map-gui Cheers, Chris
From: Christopher Rouxel on 12 Aug 2010 11:51
Hey Jasmine, try this GUI: http://www.mathworks.com/matlabcentral/fileexchange/28177-3d-performance-map-gui -Chris |