How can I plot this two figures?

조회 수: 3 (최근 30일)
Myo Gyi
Myo Gyi 2018년 10월 27일
댓글: Image Analyst 2018년 10월 28일
  댓글 수: 2
Stephen23
Stephen23 2018년 10월 27일
편집: Stephen23 2018년 10월 27일
"How can I plot this two figures?"
Calculate some points, then plot them. What have you tried so far?
Myo Gyi
Myo Gyi 2018년 10월 27일
편집: Walter Roberson 2018년 10월 27일
That is not correct sir..
w = 1;
a = 1;
r = 0:1:3;
vth = (w*a^2)./r;
plot(r,vth)
hold on
plot([0,0],[0,vth(end)])
hold off
xlabel r
ylabel \theta

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2018년 10월 27일
Try this:
w = 1;
a = 1;
r = linspace(0, 3, 500);
vth = w .* r;
% Get indexes where r is more than 1.
mask = r > 1;
% Do second (right) part of the equation.
vth(mask) = (w*a^2) ./ r(mask);
subplot(1, 2, 1);
plot(r, vth)
axis equal
xlim([0, 3]);
ylim([0, 2]);
% Plot dashed vertical line
hold on;
line([a, a], ylim, 'LineStyle', '--', 'Color', 'k', 'LineWidth', 2);
xlabel('r', 'FontSize', 20);
ylabel('u', 'FontSize', 20);
subplot(1, 2, 2);
plot([0, a], [2, 2], 'k-', 'LineWidth', 2);
xlim([0, 3]);
ylim([0, 3]);
% grid on;
xlabel('r', 'FontSize', 20);
ylabel('w', 'FontSize', 20);
% Plot dashed vertical line
hold on;
line([a, a], ylim, 'LineStyle', '--', 'Color', 'k', 'LineWidth', 2);
  댓글 수: 2
Myo Gyi
Myo Gyi 2018년 10월 28일
Thank you very much sir..
Image Analyst
Image Analyst 2018년 10월 28일
You're welcome. Thanks for Accepting.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Semiconductors and Converters에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by