A lot of the errors are fixed..
This is the current status
Code:
void Sigma(const real_T *Tc,const real_T *Irradiance,const real_T *Vpv,const real_T *I, real_T *Ipv)
{
real_T Irs, Is, J, Tcc;
(I[0] < 0) ? (J=0) : (J = I[0]);
Tcc = (Tc[0]) + 273.15; /* Celsius to Kelvin Trasformation*/
Irs = (IscRef[0]) / (exp((q[0]) * ((VocRef[0]) + (beta[0]) *((Tcc)-(Tref[0]))) / ((Ns[0]) * (K[0]) * (eta[0]) * (Tcc))) -1);
Is = (Irs) * (pow(Tcc/Tref[0], 3)) * exp( (q[0]) * (Eg[0]) * (1/(Tref[0]) - 1/(Tcc))/((K[0]) * (eta[0])));
Ipv[0] = (Np[0]) * ((((alpha[0]) * ((Tcc) - (Tref[0])) + (IscRef[0])) * (Irradiance[0])/(Irradiance_ref[0])) -
((Is) * (exp((q[0]) * ((Vpv[0])/(Ns[0]) + (J) * (Rs[0])/(Np[0])) / ((K[0]) * (Tcc) * (eta[0]))) -1) +
((Np[0])/(Ns[0]) * (Vpv[0]) + (J) * (Rs[0])) / (Rsh[0])));
}
Builder Info:
Code:
Error PV_module_wrapper.c: 71 syntax error; found `{' expecting `;'
Error PV_module_wrapper.c: 71 skipping `{'
Error PV_module_wrapper.c: 82 unrecognized declaration
3 errors, 0 warnings
C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Compile of 'PV_module_wrapper.c' failed.
Any ideas?