Matrix dimensions must agree. How can i fix it?

1 visualización (últimos 30 días)
Giuseppe Marino
Giuseppe Marino el 31 de Mzo. de 2018
Respondida: Giuseppe Marino el 31 de Mzo. de 2018
BPR=linspace(0,100,1000); f=0.015; V0=300; Vu=600; Qf=45000000; RendimentoTH= 0.5*(Vu^2-V0^2)/(BPR.*f*Qf); xlabel('/BPR');ylabel('/RendimentoTH'); plot(BPR,RendimentoTH,'.-')
In line 6, when i try to plot, this error appear. How can i fix it? It's the first time that i use Matlab and Thank you for help

Respuesta aceptada

David Goodmanson
David Goodmanson el 31 de Mzo. de 2018
Hi Guiseppe,
You need to do ./ (dot divide) rather than / (divide). That way each element of the denominator is independently divided into the numerator.

Más respuestas (1)

Giuseppe Marino
Giuseppe Marino el 31 de Mzo. de 2018
Thank you so much!

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by