Invalid use of operator
Mostrar comentarios más antiguos
Completely new to coding...I put in this
\draw plot[domain=0:7, samples=200] (\x, {0.5*sin(deg(2*pi*\x))});. And Matlab says invalid use of operator what am I doing wrong, it might help if the program would highlight what it doesn't like...Thanks
Respuesta aceptada
Más respuestas (2)
You need to specify MATLAB in your request to chatbot. Something like "Write a MATLAB program to draw a sine wave" and you should get something like this:
x = linspace(0, 7, 200);
period = pi/2;
y = 0.5 * sin(2 * pi * x / period);
plot(x, y, 'b-', 'LineWidth', 2)
fontSize = 20;
xlabel('x', 'FontSize', fontSize);
ylabel('y', 'FontSize', fontSize);
title('Sine Wave', 'FontSize', fontSize);
grid on;
1 comentario
Xeven
el 19 de Dic. de 2022
Rik
el 19 de Dic. de 2022
Movida: Image Analyst
el 19 de Dic. de 2022
0 votos
This is not Matlab code. What language is this?
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).
1 comentario
Xeven
el 19 de Dic. de 2022
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

