|Aug1-12, 10:14 AM||#1|
Plot unit circle in chebychev metric in MATLAB
Ok, so I'm trying to plot the unit circle using the chebyvhev metric, which should give me a square. I am trying this in MATLAB, using the 'pdist' and 'cmdscale' functions. My uber-complex code is the following:
% Euclidean unit circle
% Transform to Chebychev metric
axis square;axis([-boundaryPlot boundaryPlot -boundaryPlot boundaryPlot])
plot([-boundaryPlot boundaryPlot],[0 0],'k')
plot([0 0],[-boundaryPlot boundaryPlot],'k')
where the part in bold is the really important part of the code. I have two problems with this. First, the 'y' variable which is supposed to hold the coordinates under the new metric has a size of 360x180. One of these dimensions should have been 2, which is the dimension of the L-p space (p=2).
My second problem is that I get the plot you can see in the attachment, which corresponds to the Manhatan metric, and has rounded edges for some reason.
Has anyone done this calculation before? Is there some other syntax/function I should be using??
|Similar Threads for: Plot unit circle in chebychev metric in MATLAB|
|Prove that the cone over the unit circle is homeomorphic to the closed unit disc.||Calculus & Beyond Homework||4|
|How to plot multiple iterations of a while loop on one plot? [MATLAB]||Math & Science Software||1|
|Plot the sequence on the unit circle.||Calculus & Beyond Homework||1|
|Matlab - plot pressure distribution around a circle||Math & Science Software||2|
|Plot xy, coords to create a circle with centrepoint and radius||General Math||2|