How do you do freestyle drawing in MATLAB?

조회 수: 1 (최근 30일)
mpho bosupeng
mpho bosupeng 2021년 7월 26일
댓글: Chunru 2021년 7월 26일
I want to create this graph. I did it with EXCEL but it is not good quality. I want to use MATLAB to create it. How do I do it in MATLAB?
  댓글 수: 2
Chunru
Chunru 2021년 7월 26일
편집: Chunru 2021년 7월 26일
You need to provide the data, if you want the exact shape of the curve.
DGM
DGM 2021년 7월 26일
Reading the description, I don't think there is any data. That looks like it's generated with primitives like rectangles and a bezier curve.

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

채택된 답변

Chunru
Chunru 2021년 7월 26일
This gives you a schetch. You can fill up the rest using "text" and "plot" commands.
x = 5:30;
y = .2*(x-12).^2 -30;
plot(x, y, 'y-', 'LineWidth', 3); % j curve
hold on
plot([0; 35], [0; 0], 'b-', 'LineWidth', 2); % x-axis
plot([0; 0], [-40; 40], 'b-', 'LineWidth', 2); % y-axis
plot([0; x(end); x(end)], [y(end); y(end); 0], 'b--'); % C
text(-2, -20, 'Deficit', 'Rotation', 90)
xlim([0 35]);
box off
axis off
  댓글 수: 2
mpho bosupeng
mpho bosupeng 2021년 7월 26일
Thank you @Chunru. How do you make the curve not too steep? It is not an exponential curve
Chunru
Chunru 2021년 7월 26일
The formula:
x = 5:30;
y = .2*(x-12).^2 -30;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by