hi! I have a problem solving an implicit equation

조회 수: 10 (최근 30일)
Marta
Marta 2012년 6월 6일
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!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by