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 Center および File ExchangeCreating 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