The Following are requirements for a Matlab Program Open the

The Following are requirements for a Matlab Program. Open the specification sheet file for the SolarWorld brand solar electric module Scroll to the top of the 2^nd page and note the three models and associated data Write a script (*.m) file and load the following data into arrays: Model (use the char function for string elements) Voc Vmpp isc Impp Efficiency Use a for/end loop to load the data into a structure array called SolarWorld Each field should be named like the arrays above Use fprintf to output the model and maximum power from the middle model (SW 345) Maximum power is calculated by multiplying Vmpp * Impp The printed line in the Command Window should look like: The max output power for (model) is (#) Watts This is the info referenced to in the first line

Solution

field1 = \'model\'; value1 = \'SW 340;
field2 = \'Voc\'; value2 = 47.6;
field3 = \'Vmpp\'; value3 = 38;
field4 = \'isc\'; value4 = 9.69;
field5 = \'impp\'; value5 = 9.01;
field6 = \'efficiency\'; value6 = 17.04;

s1 = struct(field1,value1,field2,value2,field3,value3,field4,value4,field5,value5,field6,value6)

field1 = \'model\'; value1 = \'SW 345;
field2 = \'Voc\'; value2 = 47.8;
field3 = \'Vmpp\'; value3 = 38.2;
field4 = \'isc\'; value4 = 9.75;
field5 = \'impp\'; value5 = 9.10;
field6 = \'efficiency\'; value6 = 17.29;

s2 = struct(field1,value1,field2,value2,field3,value3,field4,value4,field5,value5,field6,value6)

field1 = \'model\'; value1 = \'SW 350;
field2 = \'Voc\'; value2 = 48;
field3 = \'Vmpp\'; value3 = 38.4;
field4 = \'isc\'; value4 = 9.82;
field5 = \'impp\'; value5 = 9.17;
field6 = \'efficiency\'; value6 = 17.54;

s3 = struct(field1,value1,field2,value2,field3,value3,field4,value4,field5,value5,field6,value6)

SolarField = [s1 s2 s3]

%printing array
for s in SolarField
   fprintf(\'model = %s\ Voc = %f\ Vmpp = %f\ Visc = %f\ impp = %f\ Efficiency = %f\ \', s.model, s.Voc,s.Vmpp,s.isc,s.impp,s.efficiency);
end

 The Following are requirements for a Matlab Program. Open the specification sheet file for the SolarWorld brand solar electric module Scroll to the top of the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site