Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
What did I do wrong with my code to get this "^" error?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I input an equation as y=((x^2)*sin(x))/exp(x) and defined x as x=logspace(0,6,7); in the script. When I run it, i get a message saying "error using ^. Inputs must be a scalar and a square matrix."
I'm trying to evaluate the different y value outputs with a range of x inputs as 1,10,100,1000,10000,100000,1000000 using a dot product feature
0 comentarios
Respuestas (1)
the cyclist
el 12 de Jun. de 2016
Editada: the cyclist
el 12 de Jun. de 2016
Try
y=((x.^2).*sin(x))./exp(x)
Notice that I added some periods, to denote element-wise operations.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!