Plotting, keep getting error that matrix dimensions must agree

I keep getting the same error. I have changed the functions and limits and it worked but it will not work with the functions I need to plot. Not sure what to do, so any help is appreciated.
Thanks.
<<
>>

1 comentario

the cyclist
the cyclist el 14 de En. de 2017
Editada: the cyclist el 14 de En. de 2017
In the future, please upload the code itself, rather than an image of the code. Then we can paste your code directly into MATLAB, which makes it much easier for us to help you.

Iniciar sesión para comentar.

 Respuesta aceptada

the cyclist
the cyclist el 14 de En. de 2017
Editada: the cyclist el 14 de En. de 2017
You need to use array operations (i.e. element-by-element operations) for what you want to do, rather than matrix operations. For example, you need
y = -1.436./x
in place of
y = -1.436/x

3 comentarios

That also applies to the exponenetiation operations:
y3 = -1.436./x + 7.32E-6./x.^8;
Hv tried .* But it keep mention matrix dim must agree!!!
@Muhammad Azrul Izmee, I suggest you open a new question, with the full description of your problem, instead of commenting on a 5-year-old question and not providing any details.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de En. de 2017

Comentada:

el 30 de En. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by