(Answers Dev) Restored edit
how can ı fixed
2 ビュー (過去 30 日間)
古いコメントを表示
sigma_0 = 2;
theta_deg = [0, 90, 180, 270];
theta_rad = deg2rad(theta_deg);
r = '1.*a':0.1:'2.*a';
sigma_r = zeros(length(r), length(theta_rad));
a = int(input("Yarıçapı Giriniz"))
for i = 1:length(r)
ksi = a./r
end
for
i = 1:length(theta_rad)
theta = theta_rad(i);
sigma_r(:, i) = (1/2.*sigma_0.*(1-(ksi.^2))) - (1/2.*sigma_0.*(1+(3.*(ksi.^4))-(4.*(ksi.^2))).*cos(2.*theta));
end
I want a value a to be entered (as input) and how can I define this value as r and continue increasing by 0.1 from a to 2a?
回答 (1 件)
sai charan sampara
2024 年 3 月 27 日
Hello Öner,
I understand that you are trying to take variable "a" as input and then define variable "r" as an array with values ranging from "a" to "2*a". It can be done as follows:
sigma_0 = 2;
theta_deg = [0, 90, 180, 270];
theta_rad = deg2rad(theta_deg);
a = input("Enter radius");
r = a:0.1:2*a;
sigma_r = zeros(length(r), length(theta_rad));
for i = 1:length(r)
ksi = a./r;
end
for i = 1:length(theta_rad)
theta = theta_rad(i);
sigma_r(:, i) = (1/2.*sigma_0.*(1-(ksi.^2))) - (1/2.*sigma_0.*(1+(3.*(ksi.^4))-(4.*(ksi.^2))).*cos(2.*theta));
end
You can refer to the following documentation for more information:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Programming Utilities についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!