Surf circumferences with borders
5 views (last 30 days)
Show older comments
Hi all, I want to surf a set of base, where I use a circumference to represent it. So, the script I wrote is:
clear all, close all, clc;
%%Input
Data=[0.671 1.000 0.388 0.860 0.863;...
0.782 0.745 0.453 1.000 0.999;...
0.782 0.642 0.453 1.000 0.997;...
0.781 0.568 0.453 1.000 0.995;...
0.781 0.510 0.452 1.000 0.994;...
0.780 0.466 0.452 1.000 0.992;...
0.780 0.434 0.452 1.000 0.990;...
0.779 0.367 0.451 1.000 0.987;...
0.774 0.228 0.449 1.000 0.972;...
0.780 0.455 0.452 1.000 0.991];
A=Data;
for i=1:size(A,1)
B{i}=repmat(A(i,:)',1,360/size(A,1));
end
B=cell2mat(B);
B=[B;ones(1,size(B,2))];
grados=360;
gra=pi/180;
Lx=210;
[t_elip,r_elip]=meshgrid(linspace(0,grados*gra,grados),linspace(0,Lx,6));
[x_elip,y_elip]=pol2cart(t_elip,r_elip);
X=x_elip;
Y=y_elip;
Z=B;
h1=figure;
surf(X,Y,Z),view([-360 90]),colorbar,xlim([-210 210]),ylim([-210 210]);
axis off;
After I compile this, I get the following figure:
but I want to get this with borders, as this figure:
What should I do? Thanks in advance
0 Comments
Answers (1)
See Also
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!