So I was trying to make graph for my homework assignment on Matlab online version using this code:
% disp("HM Problem 3")
disp("f1(x)")
x=[-5,0.5,5];
y=(2*x).^3-(3*x)+2;
plot(x,y);
grid on;
legend({'f(x)=2x^3-3x+2'},'fontsize',10)
xlabel('Input Values','fontsize',10)
kylabel('Value of the function','fontize',10)
title('function 1','fontzie',10)
But when I enter my code is says "Error using matlab.graphics.primitive.Text/set. Unrecognized property fontzize for class tex." and then another error saying "Error in ylabel(line 73) set (h, 'string', string, prvpairs{:});

 Respuesta aceptada

Jan
Jan el 2 de Mzo. de 2021
Editada: Jan el 2 de Mzo. de 2021

0 votos

In the code you have:
kylabel('Value of the function', 'fontize', 10)
title('function 1', 'fontzie', 10)
The error message says:
Unrecognized property fontzize for class tex
Neither "fontize" nor "fontzize" nor "fontzie" are correct, but "fontsize".
But maybe it is a typo in the forum only. The "kylabel" is surprising also.
Please copy&paste the code and the complete error message.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 2 de Mzo. de 2021

Editada:

Jan
el 2 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by