hi! I have a problem solving an implicit equation
Afficher commentaires plus anciens
This is the subprogram that I have created but it didn´t works:
function [Tsurf]=temp_surf(Minf,h)
[Minf,h] = meshgrid(0.05:0.05:0.95,110:100:11000);
[Tinf,Pinf,roinf,Uinf,winf,muinf,kinf,mh2o]=atmosfera(Minf,h);
[he]=convecc_ext(Minf,h);
f=@(Tsurf)18.*he./(1004.*8.135.*roinf).*(101325./Tsurf.*exp(-(2.4e6).*18./8.315.*(1./Tsurf-1./373.15)))-mh2o;
Tsurf=fsolve(f,280+100*Minf-0.001*h);
mesh(h,Minf,Tsurf)
title('Temperatura superficie exterior del perfil')
xlabel('altura(m)')
ylabel('Mach')
zlabel('T_{surf}(K)')
end
This is the error:
??? Error using ==> rdivide
Matrix dimensions must agree.
Error in ==>
temp_surf>@(Tsurf)18.*he./(1004.*8.135.*roinf).*(101325./Tsurf.*exp(-(2.4e6).*18./8.315.*(1./Tsurf-1./373.15)))-mh2o
at 5
f=@(Tsurf)18.*he./(1004.*8.135.*roinf).*(101325./Tsurf.*exp(-(2.4e6).*18./8.315.*(1./Tsurf-1./373.15)))-mh2o;
Error in ==> fsolve at 254
fuser = feval(funfcn{3},x,varargin{:});
Error in ==> temp_surf at 6
Tsurf=fsolve(f,280+100*Minf-0.001*h);
Caused by:
Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
I hope someone could help me.Thanks!
1 commentaire
Walter Roberson
le 6 Juin 2012
What are the sizes of "he" and "roinf" ?
Réponses (0)
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!