use int() with multiple lower bound

조회 수: 1 (최근 30일)
Panu
Panu 2011년 11월 21일
Hello, I have a matrix t = [0:0.1:10]
and I want to do int(y,x,t,Inf)
where y is just my function and x is my symbol Matlab give me
??? Error using ==> mupadmex Error in MuPAD command: Illegal argument [checkNumber]
I'm assuming that the int function won't take in matrix of t. Is there any way around this? I just need it to do integrate for all the lower bound in the matrix and then give me back a matrix.
Thank you very much

채택된 답변

Jan
Jan 2011년 11월 21일
What about a loop?
t = 0:0.1:10;
Result = zeros(size(t));
for it = 1:length(t)
Result(it) = int(y, x, t(it), Inf);
end
  댓글 수: 1
Panu
Panu 2011년 11월 22일
Thank, I am able to do what I need now!

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 21일
Integrate with a symbolic lower bound, and then subs() in the actual lower bound vector.
  댓글 수: 1
Panu
Panu 2011년 11월 22일
Thank you for your answer.
I will try it out.

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by