Cannot Plot the graph, Matrix dimensions must agree for R and T
조회 수: 1 (최근 30일)
이전 댓글 표시
clear
clc
%% define variable
p = 500 * 10^3;
a = 0.2;
b = 0.25;
r = [0.2 : 0.005 : 0.25];
R = [-p * (a^2 / (b^2 - a^2)) * ((b^2 / r.^2) - 1)];
T = [p * (a^2 / (b^2 - a^2)) * ((b^2 / r.^2) + 1)];
figure(1)
plot(r, R, 'r')
figure(2)
plot(r, T, 'B')
댓글 수: 0
답변 (1개)
Sabyasachi
2022년 10월 17일
% This may help you.
p = 500 * 10^3;
a = 0.2;
b = 0.25;
r = 0.2 : 0.005 : 0.25;
R = -p * (a^2\(b^2-a^2))*((b^2\r.^2)-1);
T = p * (a^2\(b^2-a^2))*((b^2\r.^2)+1);
figure(1)
plot(r, R, 'r')
figure(2)
plot(r, T, 'B')
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!