Trying to multiply these matrices and getting error "Dimensions of arrays being concatenated are not consistent."

1 Ansicht (letzte 30 Tage)
clear all
close all
clc
Xqs = 0.051; Xds = 0.051; Xmd = 0.0483; Rs = 0.055;
delta = 35;
iqds = [Rs,Xqs;-Xds,Rs];
Ifd = 0:500;
po = 6;
vll = sqrt(2/3)*208;
vm = sqrt(2/3)*vll;
vqs = vm*cos(delta);
vds = -vm*sin(delta);
E = Xmd*Ifd;
vqs_ = vqs - E;
V = [vqs_;vds];
I_out = inv(iqds)*V;
iqs = I_out(1,:);
ids = I_out(2,:);
P = (3/2).*(vqs.*iqs+vds.*ids);
Q = (3/2).*(vqs.*iqs-vds.*iqs);
T = (3.*po.*Xmd.*Ifd.*iqs)./4;
plot(P,Ifd)
grid on
------------------Command Window
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in Project_3 (line 146)
V = [vqs_;vds];

Antworten (1)

the cyclist
the cyclist am 3 Okt. 2021
vqs_ is a 1x501 vector. You can't concatenate the scalar vds to it vertically, which is what you are trying to do.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by