how do i write code for following equation
이전 댓글 표시
l=4
d=[10:10:100]*10^-6;
D=100*10^-12;
m=10^4;
t1=d^2/6*D ;
t=t1 + (i-1)*Tp;

I'm confusing about time t,what is the value of t and length of t,c(t) and s(t)
답변 (2개)
KALYAN ACHARJYA
2020년 1월 2일
편집: KALYAN ACHARJYA
2020년 1월 2일
l=4;
d=(10:10:100)*10^-6;
D=100*10^-12;
m=10^4;
t1=(d.^2)./(6*D);
Tp=? %% Define Tp
t=t1+(i-1)*Tp;
e1=(4*pi*D*t).^(3/2);
e2=-d.^2./(4*D.*t);
c_t=(m./e1).*exp(e2)
For summation s(t), please see here
댓글 수: 4
AJIT KUMAR
2020년 1월 2일
AJIT KUMAR
2020년 1월 2일
편집: Walter Roberson
2020년 1월 3일
KALYAN ACHARJYA
2020년 1월 2일
yes here t represents
t=t1+(i-1)*Tp;
Rest code with Tp
l=4;
d=(10:10:100)*10^-6;
D=100*10^-12;
m=10^4;
t1=(d.^2)./(6*D);
Tp=30;
t=t1+(i-1)*Tp;
e1=(4*pi*D*t).^(3/2);
e2=-d.^2./(4*D.*t);
c_t=(m./e1).*exp(e2) % This the result for c(t) as an array
AJIT KUMAR
2020년 1월 6일
AJIT KUMAR
2020년 1월 3일
0 개 추천
댓글 수: 5
Walter Roberson
2020년 1월 3일
The length of s_t is the same as the length of c_t, which is the same as the length of d.
What would you use a for loop to do? t is not an input to this, t is an output from this.
I think you need to rethink your c and s . I do not think they should be arrays: I think they should be functions that take an input, t, and compute an output that is the same size.
You are currently computing t, and I do not think you should be. It does not make sense to do so when you have that
there. Your definition of
needs to be understood not as a formula for a specific t, and instead as a formula relating the dummy input value, referred to as t, to an output value.
Your d is currently a vector, and I don't think it should be: I think it very likely should be a scalar, and that there should not be any relationship between d and t.
AJIT KUMAR
2020년 1월 3일
Walter Roberson
2020년 1월 6일
If t depends upon ts and ts depends upon d, then you are not using the same equations that you posted the latex for, and there is no way for us to assist you. Your
call in defining
is not possible if your t in defining
depends upon ts and ts depends upon d.
AJIT KUMAR
2020년 1월 6일
Walter Roberson
2020년 1월 6일
I have no opinion on that matter, as I do not know what equations you are implementing. All I know is that you are not implementing the equations that were posted in your Question.
카테고리
도움말 센터 및 File Exchange에서 Surrogate Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!