Skip to content
Snippets Groups Projects
Commit 57c09591 authored by Emmanuele Ravaioli's avatar Emmanuele Ravaioli
Browse files

fixed bug in rhoBeCu_nist_mat.m that caused an error when the argument...

fixed bug in rhoBeCu_nist_mat.m that caused an error when the argument f_scaling is a scalar (which should be the only way the function works...)
parent 10d043e1
No related branches found
No related tags found
No related merge requests found
Pipeline #10883218 failed
......@@ -29,8 +29,13 @@ function rhoBeCu = rhoBeCu_nist_mat(T, f_scaling)
rhoBeCu = zeros(size(T));
rhoBeCu(idxT1) = 8.2095e-08;
rhoBeCu(idxT2) = (a * T(idxT2).^3 + b * T(idxT2).^2 + c * T(idxT2) + d) .* f_scaling(idxT2);
rhoBeCu(idxT3) = (n + m * T(idxT3)) .* f_scaling(idxT3);
if length(f_scaling)==1
rhoBeCu(idxT2) = (a * T(idxT2).^3 + b * T(idxT2).^2 + c * T(idxT2) + d) .* f_scaling;
rhoBeCu(idxT3) = (n + m * T(idxT3)) .* f_scaling;
else
rhoBeCu(idxT2) = (a * T(idxT2).^3 + b * T(idxT2).^2 + c * T(idxT2) + d) .* f_scaling(idxT2);
rhoBeCu(idxT3) = (n + m * T(idxT3)) .* f_scaling(idxT3);
end
% Old approximation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment