Error using * Inner matrix dimensions must agree.

1 visualización (últimos 30 días)
Ammar Babikir
Ammar Babikir el 5 de Mzo. de 2018
Comentada: Ammar Babikir el 5 de Mzo. de 2018
Hello everybody,
I keep getting this error:
Error using *
Inner matrix dimensions must agree.
Error in ECE_102_PROBLEM_1_PART_F (line 8) iS_1 = (I/2) + (I/Vov)*(Vd/2)*sqrt( (1) - ( (Vd/2) / Vov ) * ( (Vd/2) / Vov ) );
Here is my code:
I = 100 % I_D_M5 = 100 uA
Vov = 0.1 % Vov of M1 = Vov of M2 = 0.1 V
Vd = 0:0.1:10;
iS_1 = (I/2) + (I/Vov)*(Vd/2)*sqrt( (1) - ( (Vd/2) / Vov ) * ( (Vd/2) / Vov ) );
figure(); plot(Vd,iS_1,'LineWidth',2); legend('Initial Droop Curve' ,'Final Droop Curve'); title('iS1 vs. input differential voltage'); xlabel('Input Differential Voltage, Vd (Volts)'); ylabel('iS_1, (A)');

Respuesta aceptada

Walter Roberson
Walter Roberson el 5 de Mzo. de 2018
On that line change all the * to .*
  2 comentarios
Ammar Babikir
Ammar Babikir el 5 de Mzo. de 2018
It still doesn't work. Gives me this:
Error using * Inner matrix dimensions must agree.
Error in ECE_102_PROBLEM_1_PART_F (line 7) iS_1 = (I/2) + (I/Vov)*(Vd/2)*sqrt( (1) - ( (Vd/2) / Vov ) .* ( (Vd/2) / Vov ) );
Ammar Babikir
Ammar Babikir el 5 de Mzo. de 2018
Nevermind I forgot to change all of the * expressions.
It works now. Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB 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