In order to know the water salinity, the script uses the Fofonnoff and Millard equation.
The inputs are:
- Pressure of the water, db.
- Water conductivity, mS/cm.
- Temperature of the water, ºC.
Generally, these physical variables are measured, using a CTD.
Gar (2020). Water Salinity from Pressure and Conductivity of tyhe water (https://www.mathworks.com/matlabcentral/fileexchange/32176-water-salinity-from-pressure-and-conductivity-of-tyhe-water), MATLAB Central File Exchange. Retrieved .
Running the code typing [S]= conduc2sali(C,T,P) this error occurs
Error using *
Inner matrix dimensions must agree.
Error in conduc2sali (line 43)
RT35 = (((c3+c4*T)*T+c2)*T+c1)*T+c0;
Running from Run button it "Review the inputs.."
Anyone had the same problem?
The script works fine if you modify lines 2 and 3 to:
cnd = C / 42,914;
R = cnd
output unit would be helpful
Now, the function can be to use with a set of values.