i keep getting this error on octave, error: operator *: nonconformant arguments (op1 is 1x101, op2 is 1x956) error: called from whateverson at line 11 column 5
the program is as follows
% Power flow
clear all;
clc;
V1 = 0.95*238:0.001*238:1.05*238; %kV
V2 = 0.95*23:0.001*230:1.05*230;%kV
D_angle = 15 * (pi / 180); % Radians
R = 230 * 0.099; #Ohm
X = 230 * 0.518; #Ohm
% Equations:
P12 = (1 / (R^2 + X^2)) * (R .* V1.^2 - R .* V1 * V2 .* cos (D_angle) + X .* V1 * V2 .* sin(D_angle));
Q12 = (1 / (R^2 + X^2)) * (X .* V1.^2 - X .* V1 * V2 .* cos (D_angle) - R .* V1 * V2 .* sin(D_angle));
P21 = (1 / (R^2 + X^2)) * (R .* V2.^2 - R .* V1 * V2 .* cos (D_angle) - X .* V1 * V2 .* sin(D_angle));
Q21 = (1 / (R^2 + X^2)) * (X .* V2.^2 - X .* V1 * V2 .* cos (D_angle) + R .* V1 * V2 .* sin(D_angle));
Ploss = P12 + P21;
Qloss = Q12 + Q21;
clf (figure (1));
figure(1);
plot (V1,P12, 'b');
xlabel('V1(kV)');
ylabel('P12 (MW)');
box on;
grid on;
apparently my vectors dont have the same dimensions but i just cant get why, some light would be much appreciated
V1 * V2.V1is 1x101 andV2is 1x956. Those don't match - beaker