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

2 vues (au cours des 30 derniers jours)
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];

Réponses (1)

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

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by