Error using vertcat Dimensions of arrays being concatenated are not consistent.

sol = [alpha_2; W2; B2; W3; B_3; V3; a3; w; n; l; S; Ni; rh; rt; L_F]'
table = array2table(sol,'VariableNames',{'alpha_2','W2','B2','W3','B_3','V3','a3','w','n','l','S','Ni','rh','rt','L_F'})

5 Comments

Not sure why I am getting error.Can anyone help me?
Can you give us the values of all the variables?
alpha_2; W2; B2; W3; B_3; V3; a3; w; n; l; S; Ni; rh; rt; L_F
The values of the variables are in Matlab code.
h = 25; % heat energy to work
g = 32.17; % gravitational constant
V2 = sqrt(2*g*h*778) % adiabatic velocity
U_Vo = 0.41; % velocity ratio
U = U_Vo * V2; % velocity of the blade
N = 3600; % shaft rotation
rm = (U*60)/(2*pi*N) % midline radius
alpha_2 = [8,9,10,11,12]; % angle made by absolute velocity of steam with tangential direction
alpha2 = alpha_2.*(pi/180)
W2 = sqrt(V2.^2 + U.^2 - 2.*V2.*U.*cos(alpha2)); % relative velocity
beta2 = (atan((V2.*sin(alpha2))./(V2.*cos(alpha2) - U))); % angle made by relative velocity with tangential direction
B2 = beta2.*(180/pi);
W3 = W2;
B3 = beta2;
B_3 = B2;
V3 = sqrt(W3.^2 + U.^2 - 2.*W3.*U.*cos(B3)) % velocity of steam at rotor exit
alpha3 = asin((sin(B3).*U)./V3) + B3;
a3 = alpha3.*(180/pi);
w = 2.*W2.*cos(beta2).*(U./(g.*778)); % specific work
n = (w./((V2.^2)./(2.*g.*778))).*100;
v2 = 0.51485; % specific volume
mdot = 264.417; % mass flow rate in lbm/s
dm = 2*rm;
l = (mdot.*v2)./(pi.*dm.*W3.*sin(B3)) % height of rotor blade
c = 0.75; % chord length
b = c; % axial length
S = (0.85.*b)./(2.*(2.*tan(beta2)).*(cos(B3)).^2); % spacing between blades
Ni = (2*pi*rm*12)./S; % number of blades
rh = rm - 1./2; % radius of hub
rt = rm + 1./2 % radius of tip
A = pi.*(rt.^2 - rh.^2); % area of cross section
rh./rt;
L_F = (w.*778)./((U.^2)./g)% load factor
sol = [alpha_2; W2; B2; W3; B_3; V3; a3; w; n; l; S; Ni; rh; rt; L_F]'
table = array2table(sol,'VariableNames',{'a2','W2','B2','W3','B_3','V3','a3','w','n','l','S','Ni','rh','rt','L_F'})
All the variables in sol = [...] have dimensions 1x5, except 'rh' and 'rt'. They should also have same dimensions.

Sign in to comment.

Answers (0)

Products

Asked:

on 21 Apr 2020

Commented:

on 21 Apr 2020

Community Treasure Hunt

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

Start Hunting!