How do I pull a value out of a different equation @ a specific value

조회 수: 1 (최근 30일)
I am trying to find the value of D @ time Tmin but in my mind I think it should go like Tmin(D) but it says indices must be positive intgers or logical values.
function[Tmin,Dt] = Tension(Lb,Lc,W,Dmin,Dmax)
D = linspace(Dmin,Dmax,20);
T = (Lb*Lc*W)./(D.*sqrt(Lc^2-D.^2));
Tmin = min(T);
Dt = T(Tmin);

채택된 답변

James Tursa
James Tursa 2019년 10월 3일
편집: James Tursa 2019년 10월 3일
[Tmin,k] = min(T);
Dt = D(k);
  댓글 수: 1
Bryce Johnson
Bryce Johnson 2019년 10월 3일
Thanks I just couldn't figure it out, also I replaced Dmin with Dt because Dmin is already specified in the function input but that still worked.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by