필터 지우기
필터 지우기

how to solve log log equation??

조회 수: 2 (최근 30일)
mahmoud abougharara
mahmoud abougharara 2023년 12월 23일
편집: Torsten 2023년 12월 23일
clc ,clear
syms m
m1=7;
m2=9.41;
t1=273+30;
t2=273+50;
t=40+273
t = 313
b=(log10(log10(m1))-log10(log10(m2)))/((log10(t1)-(log10(t2))));
a=log10(log10(m1))-b*log10(t1);
a
a = -5.5678
b
b = 2.2143
log10(log10(m))=a-b*log10(t);
Error using indexing
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym expression.
solve(m)
  댓글 수: 1
Matt J
Matt J 2023년 12월 23일
Why not as written?

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

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 12월 23일
Here is the corrected code (note how the EQN is set up for the given equation):
clc, clearvars
syms m
m1=7;
m2=9.41;
t1=273+30;
t2=273+50;
t=40+273;
b=(log10(log10(m1))-log10(log10(m2)))/((log10(t1)-(log10(t2))));
a=log10(log10(m1))-b*log10(t1);
fprintf('a = %f; b = %f \n', [a, b])
a = -5.567761; b = 2.214304
EQN =log10(log10(m))==a-b*log10(t);
SOL = solve(EQN);
fprintf('Solution: m = %1.16f with solve() \n', double(SOL));
Solution: m = 1.0000000000185594 with solve()
  댓글 수: 1
Torsten
Torsten 2023년 12월 23일
편집: Torsten 2023년 12월 23일
Or
m = 10^(10^(a-b*log10(t)))

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by