matlab code help for equation solving
조회 수: 1 (최근 30일)
이전 댓글 표시
can anyone please provide the matlab code to solve and find the value of k for the given equation
ω^2= gκ tanh κd
given
d=100
g=9.8
ω= 0:0.01:10
댓글 수: 3
Rik
2019년 9월 2일
It is probably the best strategy to try to rewrite the formula with algebra. Other than that my question would be the same as Darova: what have you tried so far?
채택된 답변
Dimitris Kalogiros
2019년 9월 2일
편집: Dimitris Kalogiros
2019년 9월 2일
Hi A. Hossain
Try this:
clear; clc;
syms w d k
d=100
g=9.8
for w=0:0.01:10
fprintf('----- w = %f -----\n', w);
eq=w.^2==g*k*tanh(k*d)
vpasolve(eq)
fprintf('\n\n');
end
Of Course, it does not provide an analytical solution, but a numerical one.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!