3D plotting with three input an one output.

조회 수: 3 (최근 30일)
Osman AKYUREK
Osman AKYUREK 2023년 5월 10일
답변: Cris LaPierre 2023년 5월 22일
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
Nirupama Nagarathinam 2023년 5월 22일
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개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by