Cannot Plot the graph, Matrix dimensions must agree for R and T
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Sabyasachi
on 17 Oct 2022
% 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 Comments
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!