Trying to multiply these matrices and getting error "Dimensions of arrays being concatenated are not consistent."
2 views (last 30 days)
Show older comments
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];
0 Comments
Answers (1)
the cyclist
on 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.
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!