My basic question is this: Is there any way in which I can plot the matrix using surf.m and indicate the actual angle and frequency values, instead of integer values?
help meshgrid
help plot3
"kinor " <kinor.remov...@gmx.de> wrote in message <hedkna$490$1...@fred.mathworks.com>...
% Yes, use meshgrid.
% meshgrid does NOT require the length of its INPUTS to be the same.
doc meshgrid
% and see the Examples section.
% (The OUTPUTS of meshgrid are matricies of the same size.)
value 1 corresponds to frequency 20Khz and angle 0deg
2 20Khz 10 deg
3 20Khz 20 deg
...
5 19Khz 0 deg
6 19 Khz 10 deg
and so on...
I can plot this matrix using surf.m But the xaxis ranges from 1:4 and the yaxis ranges from 1:2.
I want to show in the diagram that x axis is from 0 - 30 deg and y axis from 20 - 19Khz.
Is there a way to do this?
Thanks
KV
% Yes, use the xlim & ylim commands.
doc xlim
doc ylim
% Something like (after plotting):
xlim([0 30])
ylim([19 20])
% or set the axes properties for XLim, YLim, XDir directly
set(gca,'YDir', 'reverse')
% There are many other axes properties you can set as well.
doc axes
% shoul get you started.
It sounds like you're calling SURF with just one input -- if so take a look
in the help for the 3-input syntax, which allows you to specify the x- and
y- coordinates at which the surface "cells" should be plotted.
--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
Triangulate using this:
http://www.advancedmcode.org/structured-triangular-mesh-generation.html
then plot using "trisurf"