Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Some Calling Problem ...dunno what is the problem

1 visualización (últimos 30 días)
Gowtham
Gowtham el 7 de Jul. de 2011
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
>> RF_Model2(1,400,27,1.41,900,175) Error in ==> scattering_xsection at 4 global xsection_en
??? Output argument "sigma_en" (and maybe others) not assigned during call to "C:\Users\Gowtham\Desktop\Actual Code\RF Model\scattering_xsection.m>scattering_xsection".
Error in ==> RF_Model2 at 189 sigma_en = scattering_xsection(T_e);
and the calling statement was
sigma_en = scattering_xsection(T_e);
% Maxwellian-averaged electron-neutral momentum transfer (scattering) cross-section

Respuestas (2)

Jan
Jan el 7 de Jul. de 2011
The error message is clear: The output argument was not assigned inside the function. You can use the debugger to step through your code line by line to find out, why this did not happen. Without seeing the code, we have no chance to guess the reason for the problem.
  2 comentarios
Gowtham
Gowtham el 7 de Jul. de 2011
function sigma_en = scattering_xsection(T_e)
% this function linearly interpolate the pre-computed averaged total scattering cross-section for Xenon.
global xsection_en
xsection_en = dlmread('Averaged_total_scattering_xsection.txt', '\t');
T = xsection_en(:,1);
cross = xsection_en(:,2);
if T_e > 100
error('Electron temperature > 100 eV, data out of range')
end
for i = 1:length(T)
if (T(i) <= T_e) & (T(i+1) > T_e)
alpha = (T_e - T(i)) / (T(i+1) - T(i));
sigma_en = alpha*(cross(i+1) - cross(i)) + cross(i);
break
end
end this is the subroutine...
can you please tell what could be the problem...
Jan
Jan el 7 de Jul. de 2011
@Gowtham: Please do not send me emails. This is a public forum. I offer assistance for free and there is no reason to annoy me with pushing mails.
Obviously "(T(i) <= T_e) & (T(i+1) > T_e)" is not true for any i.

Kaustubha Govind
Kaustubha Govind el 7 de Jul. de 2011
It looks like the error occurred in scattering_xsection itself (not in RF_Model2), so make sure that you assign the output variables in that function.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by