How do you do freestyle drawing in MATLAB?

1 visualización (últimos 30 días)
mpho bosupeng
mpho bosupeng el 26 de Jul. de 2021
Comentada: Chunru el 26 de Jul. de 2021
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 comentarios
Chunru
Chunru el 26 de Jul. de 2021
Editada: Chunru el 26 de Jul. de 2021
You need to provide the data, if you want the exact shape of the curve.
DGM
DGM el 26 de Jul. de 2021
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.

Iniciar sesión para comentar.

Respuesta aceptada

Chunru
Chunru el 26 de Jul. de 2021
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 comentarios
mpho bosupeng
mpho bosupeng el 26 de Jul. de 2021
Thank you @Chunru. How do you make the curve not too steep? It is not an exponential curve
Chunru
Chunru el 26 de Jul. de 2021
The formula:
x = 5:30;
y = .2*(x-12).^2 -30;

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by