3D plotting with three input an one output.

4 次查看(过去 30 天)
Hi All,
I have three variables to compute new data like Dt=x^2+y^2+z^2. I want to get a 3D plot to see how Dt change with three variable. My case study is below. Any help will be appreciated.
Best,
OA
clear
close all
Wq=0.55272; % torsional frequency in Hz
Wx=0.50914; % Lateral frequency in x direction (Hz)
Wy=0.51109; % Lateral frequency in w direction (Hz)
Qx=Wq/Wx; % frequency ratio
Qy=Wq/Wy; % frequency ratio
ex=0.204; % geometric eccentricity in x direction
ey=0.204; % geometric eccentricity in y direction
e=sqrt(ex^2+ey^2); % absolute eccentricty
Lx=35; % building dimension in x direction in meter
Ly=35; % building dimension in x direction in meter
rx=Lx/sqrt(12); % radius of gyration in x direction
ry=Ly/sqrt(12); % radius of gyration in y direction
r=sqrt(rx^2+ry^2); % absolute radius of gyration
ref=r+e; % effective radius of gyration
nt=1.134; % nt=(delta max/delta avg)
Ax=(nt/1.2)^2; % torsional irregularity coefffcient Ax=(delta max/1.2delta avg)^2
Lamda=(1.2*sqrt(Ax)-1)/(0.6*sqrt(Ax)); % proposed torsional coeffcient
j=1;
k=1;
l=1;
Lx=1;
Ly=1;
e=0;
for As=0.2:0.1:5
for Ax=0.7:0.1:4;
for e=0:0.1:2;
edx(k,j,l)=(((Qy*(sqrt(((As^-2+1)*(Lx)^2)/12)+e))^2)/Lx)*((1.2*(Ax^0.5)-1)/(0.6*(Ax^0.5)));
edy(k,j,l)=(((Qx*(sqrt(((As^2+1)*(Ly)^2)/12)+e))^2)/Ly)*((1.2*(Ax^0.5)-1)/(0.6*(Ax^0.5)));
ed(k,j,l)=sqrt(edx(k,j,l).^2+edy(k,j,l).^2);
Ass(k,j,l)= As;
Axx(k,j,l)=Ax;
ee(k,j,l)=e;
l=l+1;
end
l=1;
k=k+1;
end
k=1;
j=j+1;
end
figure (1)
isosurface(Ass,Axx,ee,ed,1)
  2 个评论
Nirupama Nagarathinam
What kind of 3D plot are you looking for?
You have used "isosurface" function here and how is the obtained result different from what you are expecting?
Osman AKYUREK
Osman AKYUREK 2023-5-22
Hi,
My variable vectors are 'Ass', 'Axx', and 'ee'. I want to see the change in the 'ed' with colorbar. Can you please help me with that.
Best

请先登录,再进行评论。

采纳的回答

Cris LaPierre
Cris LaPierre 2023-5-22
If I understand isosurface correctly, you are showing a surface that represents where ed=1 in your volumetric data. For this surface, there will be no variation in color due to ed because the value of ed is the same everywhere on this surface.
Are you instead trying to view the value of ed across your entire volume? If so, that is a 4D problem. You might find this answer helpful.

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by