필터 지우기
필터 지우기

How to solve this function?

조회 수: 1 (최근 30일)
Ramesh
Ramesh 2024년 2월 5일
편집: Matt J 2024년 2월 5일
function rate=ptMech(C,T,par)
% Obtain the parameter values
A=par.A;
E=par.E;
b=par.b;
R=8.314;
% Compute k
k=A*exp(-E/(R*T));
% Compute the result
rate=k*C^b;
end
  댓글 수: 1
Matt J
Matt J 2024년 2월 5일
편집: Matt J 2024년 2월 5일
What do you mean "solve" it? A function is not an equaiton.

댓글을 달려면 로그인하십시오.

답변 (1개)

William Rose
William Rose 2024년 2월 5일
I am not sure what you mean by "how do you solve this function".
You have posted a function.
par=struct('A',1,'E',2,'b',3); % define par
T=273; C=1; % define T, C
rate=ptMech(C,T,par) % call function ptMech()
rate = 0.9991
function rate=ptMech(C,T,par)
% Obtain the parameter values
A=par.A;
E=par.E;
b=par.b;
R=8.314;
% Compute k
k=A*exp(-E/(R*T));
% Compute the result
rate=k*C^b;
end
If you call the function with appropriate parameters, as shown above, it will return an answer.
Do you want to fix some of the parameters, and then find the value of other parameters that will make ptMech equal zero? You can see that C=0 and A=0 (either one, or both) will yield ptMech=0.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by