mathematical model into matlab
이전 댓글 표시
how can i write the following mathematical model in MATLAB and get answer of (q) for any value of (t) that i want to put in
q(t)= (6.25* 10^9)/(t+500)^3
답변 (2개)
Method 1 Anonymous Function
q = @(t) (6.25* 10^9)/(t+500)^3 ;
q(1)
Method 2
t = 1 ;
q = (6.25* 10^9)/(t+500)^3 ;
If you have an array of t :
t = 0:0.01:10 ;
q = (6.25* 10^9)./(t+500).^3 ;
plot(t,q)
댓글 수: 4
Walter Roberson
2020년 5월 6일
Note: the above are not vectorized
prinesh patel
2020년 5월 6일
prinesh patel
2020년 5월 6일
KSSV
2020년 5월 6일
Read about diff. If you want it symbolic read about syms.
Walter Roberson
2020년 5월 6일
편집: Walter Roberson
2020년 5월 6일
q = @(t) (6.25* 10^9)./(t+500).^3
This will work for vectors or arrays of t.
댓글 수: 5
prinesh patel
2020년 5월 6일
Walter Roberson
2020년 5월 6일
I recommend using the Symbolic Toolbox
prinesh patel
2020년 5월 6일
Walter Roberson
2020년 5월 6일
Indeed you did email me, but I always assume that email is confidential unless the sender says otherwise. It would not be proper for me to respond in public to confidential information.
prinesh patel
2020년 5월 6일
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!