Question
I attached Matlab code with it's results (( and I also paste Matlab code as well )) alll what you have to do is to
I attached Matlab code with it's results (( and I also paste Matlab code as well ))
alll what you have to do is to write a C++ code has output results Matches the matlap's result
Please Please Please ( Copy the C++ code and paste it here and take a screen shot of the output and attach it as well here )
Thank you
Vr = 121000;
z = (16.8 + i*123.2);
y = i*5.7400e-4;
Vfl = 210000;
A = z * y / 2 + 1;
B = z;
C = y * (z * y / 4 + 1 );
D = z * y / 2 + 1;
Irm = 412;
Irp = -31.8;
Ir = Irm * cosd(Irp) + i * ( Irm * sind(Irp));
Vs = A * Vr + B * Ir;
Vsm = abs(Vs);
Vsp = angle(Vs);
Vs_ang = ((Vsp/(2*pi)) * 360);
vLLs = sqrt(3) * Vsm;
Vnl = vLLs;
Is = C * Vr + D * Ir;
Ism = abs(Is);
Isp = angle(Is);
Is_ang = ((Isp/(2*pi)) * 360);
PF = cosd(-Irp);
Po = 3 * Vr * Irm * PF;
Pi = 3 * Vsm * Ism * cosd( Vs_ang - Is_ang );
n = ( Po / Pi ) * 100;
VR = (( Vnl - Vfl) / Vfl ) * 100;
disp([ '------------------------------------'])
disp([ 'The results are '])
disp([ '------------------------------------'])
disp([ 'Vs = [ ' num2str(Vsm) ' /_ ' num2str(Vs_ang) ' ] V'])
disp([ 'Is = [ ' num2str(Ism) ' /_ ' num2str(Is_ang) ' ] A'])
disp([ 'cos(phi) = [ ' num2str(PF) ' ]'])
disp([ 'n = [ ' num2str(n) ' ] %'])
disp([ 'VR = [ ' num2str(VR) ' ] %'])
disp([ '------------------------------------'])
Workspace Name A Value 0.9646 0.0048i 1.6800e +01 1.2320e+02i -1.3838e-06 5.6385e-04. 0.9646 0.0048i 3.5016e+ 02 2.1711e+02i 412 rm 31.8000 rp 3.3865e+ 02 1.395 le+ 02 IS ang 22.3901 Ism 366.2664 bid sp 0.3908 94.1792 PF 0.8499 1.3496e +08 1.2711e- 08 Po EE Vfl 210000 EE vLLs 2.6784e+05 Vnl 2.6784e+05 121000 Vr VR 27.5407 1.4935e+05 4.0075e+04i VS E Vs ang 15.0202 t Vism 1.5463e+05 Vsp 0.2622 0.0000e+00 5.7400e-0 1.6800e +01 1.2320e+02 Command Window New to MATLAB? See resources for Getting Started. Problem 1 The results are 15.0202 V 154634.891 Vs 22.3901 A 366.2664. Is cos (phi) 0.84989 94.1792 27.5407 VR Workspace Name A Value 0.9646 0.0048i 1.6800e +01 1.2320e+02i -1.3838e-06 5.6385e-04. 0.9646 0.0048i 3.5016e+ 02 2.1711e+02i 412 rm 31.8000 rp 3.3865e+ 02 1.395 le+ 02 IS ang 22.3901 Ism 366.2664 bid sp 0.3908 94.1792 PF 0.8499 1.3496e +08 1.2711e- 08 Po EE Vfl 210000 EE vLLs 2.6784e+05 Vnl 2.6784e+05 121000 Vr VR 27.5407 1.4935e+05 4.0075e+04i VS E Vs ang 15.0202 t Vism 1.5463e+05 Vsp 0.2622 0.0000e+00 5.7400e-0 1.6800e +01 1.2320e+02 Command Window New to MATLAB? See resources for Getting Started. Problem 1 The results are 15.0202 V 154634.891 Vs 22.3901 A 366.2664. Is cos (phi) 0.84989 94.1792 27.5407 VR
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started