3d plotting error - incorrect dimensions
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I have a problem with 3d plotting and I don't know why. MATLAB gives me an error. If anyone can help me with it, I will really appreciate it. The code is attached below.
Best,
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
% k=1
% for nt=1:0.01:10 % nt=(delta max/delta avg)
% Ax(k)=(nt/1.2)^2; % torsional irregularity coefffcient Ax=(delta max/1.2delta avg)^2
% Lamda(k)=(1.2*sqrt(Ax)-1)/(0.6*sqrt(Ax)); % proposed torsional coeffcient
% k=k+1;
% end
% nt=1:0.01:10;
% figure (1)
% plot (nt,Lamda)
%edx=((Qy*ref)^2/(Lx))*Lamda % design eccentricty in x direction
% edy=((Qx*ref)^2/(Ly))*Lamda % design eccentricty in y direction
e=[0:1:10];
Ax=[1:1:10];
[ee,Axx]=meshgrid(e,Ax);
edx=((Qy*(((sqrt((Lx^2)/12+(Ly^2)/12))+ee))).^2/(Lx))*((1.2*(Axx.^0.5)-1)/(0.6*(Axx.^0.5))) % design eccentricty in x direction
figure
surf(ee,Axx,edx);
0 件のコメント
採用された回答
Image Analyst
2023 年 5 月 8 日
Try using ./ instead of / and .* instead of *
3 件のコメント
Image Analyst
2023 年 5 月 8 日
Your equation is way too complicated. Try breaking it up into bite sized chunks and look at each term. For example
term1 = (Lx^2)/12
term2 = (Ly^2)/12
term3 = sqrt(term1 + term2) + ee
% edx=((Qy*(((sqrt((Lx^2)/12+(Ly^2)/12))+ee))).^2/(Lx))*((1.2*(Axx.^0.5)-1)/(0.6*(Axx.^0.5)))
edx = ((Qy * term3 .^ 2 ./ Lx) .* ((1.2*(Axx.^0.5)-1)/(0.6*(Axx.^0.5))) % design eccentricty in x direction
and so on.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!