From: Steven Lord on 11 Mar 2010 09:12 "noemailplease" <noemailplease(a)nno.email.please> wrote in message news:5-udnWFvuIsGSgXWnZ2dnUVZ_s-dnZ2d(a)westnet.com.au... >I have recently stated using MatLab and have come across a problem with >plotting: > > I have data [x,y,z,gain] and would like to represent this on a plot of > some sort. What I am thinking is a 3D plot of (x,y,z) where the colour of > that point is defined using a colormap (hot) for the value at that point. > > Is this possible? If so, how? An example would be appreciated. Or is > there another way? Take a look at the SURF or SCATTER3 functions. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: TideMan on 11 Mar 2010 14:09 On Mar 12, 3:12 am, "Steven Lord" <sl...(a)mathworks.com> wrote: > "noemailplease" <noemailple...(a)nno.email.please> wrote in message > > news:5-udnWFvuIsGSgXWnZ2dnUVZ_s-dnZ2d(a)westnet.com.au... > > >I have recently stated using MatLab and have come across a problem with > >plotting: > > > I have data [x,y,z,gain] and would like to represent this on a plot of > > some sort. What I am thinking is a 3D plot of (x,y,z) where the colour of > > that point is defined using a colormap (hot) for the value at that point. > > > Is this possible? If so, how? An example would be appreciated. Or is > > there another way? > > Take a look at the SURF or SCATTER3 functions. > > -- > Steve Lord > sl...(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ Also contourf
From: noemailplease on 12 Mar 2010 00:22 TideMan wrote: > On Mar 12, 3:12 am, "Steven Lord" <sl...(a)mathworks.com> wrote: >> "noemailplease" <noemailple...(a)nno.email.please> wrote in message >> >> news:5-udnWFvuIsGSgXWnZ2dnUVZ_s-dnZ2d(a)westnet.com.au... >> >>> I have recently stated using MatLab and have come across a problem with >>> plotting: >>> I have data [x,y,z,gain] and would like to represent this on a plot of >>> some sort. What I am thinking is a 3D plot of (x,y,z) where the colour of >>> that point is defined using a colormap (hot) for the value at that point. >>> Is this possible? If so, how? An example would be appreciated. Or is >>> there another way? >> Take a look at the SURF or SCATTER3 functions. >> >> -- >> Steve Lord >> sl...(a)mathworks.com >> comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ > > Also contourf Thanks for the feedback so far, but this hasn't helped me. I think the first part of the problem (other that I am new to this!) is the data is not in the right "format" for the plotting functions. I have a list of values collected through experimentation: input1, input2, input3, gain 1 1 1 -1.0342 1 1 2 -1.0311 1 1 3 -1.3286 .... .... 256 256 256 10.8734 I guess I must first do something to this data to get it "ready" for plotting? If so, what? Then, how do I get MatLab to colour the point at (x,y,z) in accordance with the value of the gain for that point? (I am also guessing the gain value might have to be normalized [0,1] to be best interpreted by the colormap??) Any more help is appreciated.
From: Ken Garrard on 12 Mar 2010 10:20 noemailplease <noemailplease(a)nno.email.please> wrote in message <TP-dnUrMr8kTUgTWnZ2dnUVZ_qWdnZ2d(a)westnet.com.au>... > TideMan wrote: > > On Mar 12, 3:12 am, "Steven Lord" <sl...(a)mathworks.com> wrote: > >> "noemailplease" <noemailple...(a)nno.email.please> wrote in message > >> > >> news:5-udnWFvuIsGSgXWnZ2dnUVZ_s-dnZ2d(a)westnet.com.au... > >> > >>> I have recently stated using MatLab and have come across a problem with > >>> plotting: > >>> I have data [x,y,z,gain] and would like to represent this on a plot of > >>> some sort. What I am thinking is a 3D plot of (x,y,z) where the colour of > >>> that point is defined using a colormap (hot) for the value at that point. > >>> Is this possible? If so, how? An example would be appreciated. Or is > >>> there another way? > >> Take a look at the SURF or SCATTER3 functions. > >> > >> -- > >> Steve Lord > >> sl...(a)mathworks.com > >> comp.soft-sys.matlab (CSSM) FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ > > > > Also contourf > > > Thanks for the feedback so far, but this hasn't helped me. > > I think the first part of the problem (other that I am new to this!) is > the data is not in the right "format" for the plotting functions. > > I have a list of values collected through experimentation: > input1, input2, input3, gain > 1 1 1 -1.0342 > 1 1 2 -1.0311 > 1 1 3 -1.3286 > ... > ... > 256 256 256 10.8734 > > I guess I must first do something to this data to get it "ready" for > plotting? If so, what? > > Then, how do I get MatLab to colour the point at (x,y,z) in accordance > with the value of the gain for that point? (I am also guessing the gain > value might have to be normalized [0,1] to be best interpreted by the > colormap??) > > > Any more help is appreciated. Try the FEX function plot3k. Id# is 9519.
From: noemailplease on 13 Mar 2010 07:20 Ken Garrard wrote: > noemailplease <noemailplease(a)nno.email.please> wrote in message > <TP-dnUrMr8kTUgTWnZ2dnUVZ_qWdnZ2d(a)westnet.com.au>... >> TideMan wrote: >> > On Mar 12, 3:12 am, "Steven Lord" <sl...(a)mathworks.com> wrote: >> >> "noemailplease" <noemailple...(a)nno.email.please> wrote in message >> >> >> >> news:5-udnWFvuIsGSgXWnZ2dnUVZ_s-dnZ2d(a)westnet.com.au... >> >> >> >>> I have recently stated using MatLab and have come across a problem >> with >> >>> plotting: >> >>> I have data [x,y,z,gain] and would like to represent this on a >> plot of >> >>> some sort. What I am thinking is a 3D plot of (x,y,z) where the >> colour of >> >>> that point is defined using a colormap (hot) for the value at that >> point. >> >>> Is this possible? If so, how? An example would be appreciated. >> Or is >> >>> there another way? >> >> Take a look at the SURF or SCATTER3 functions. >> >> >> >> -- >> >> Steve Lord >> >> sl...(a)mathworks.com >> >> comp.soft-sys.matlab (CSSM) >> FAQ:http://matlabwiki.mathworks.com/MATLAB_FAQ >> > > Also contourf >> >> >> Thanks for the feedback so far, but this hasn't helped me. >> >> I think the first part of the problem (other that I am new to this!) >> is the data is not in the right "format" for the plotting functions. >> >> I have a list of values collected through experimentation: >> input1, input2, input3, gain >> 1 1 1 -1.0342 >> 1 1 2 -1.0311 >> 1 1 3 -1.3286 >> ... >> ... >> 256 256 256 10.8734 >> >> I guess I must first do something to this data to get it "ready" for >> plotting? If so, what? >> >> Then, how do I get MatLab to colour the point at (x,y,z) in accordance >> with the value of the gain for that point? (I am also guessing the >> gain value might have to be normalized [0,1] to be best interpreted by >> the colormap??) >> >> >> Any more help is appreciated. > > Try the FEX function plot3k. Id# is 9519. Thanks Ken, that is the exact function I need. Great work too!
|
Pages: 1 Prev: Subplots with one title Next: Lane Departure Warning system |