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

조회 수: 1 (최근 30일)
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];

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by