Write a user defined MATLAB program that performs power factorcorrection. The inputs to the MATLAB function should be
voltage across the load (in Vrms, assume 0 phase), frequency
Resistance of the load
Inductance of the load
power factor of the load
target power factor
The output of the function should be the size of the capacitorthat one would need to place in parallel with the load to reach thetarget power factor.
Please submit the code for the MATLAB function and include asample command line call to the function showing reasonable inputsand correct outputs.
Provide a generic MATLAB code, an example of a circuit diagram,MATLAB output, and a backup calculation.