How to write exponential function with limits?

Hi, How can I write the following two functions
Can I use "piece wise" function? If yes than how to use it?

댓글 수: 2

Rik
Rik 2018년 3월 31일
Do you want a symbolic function, or an anonymous function?
Actually I have a RC circuit with some values.I just want to use the above function in the following equation to solve the circuit.

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

 채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 31일
편집: Walter Roberson 2018년 3월 31일

1 개 추천

댓글 수: 4

rohail khan
rohail khan 2018년 3월 31일
편집: rohail khan 2018년 3월 31일
thanks Walter. So can I write the function as :
u = @(t) 0 .* (x <= 0) + sin(100*pi*t).*(x>0)
Yes, but you can shorten that to
u = @(t) sin(100*pi*t) .* (x>=0);
RC = 0.04;
U = @(t) sin(100*pi*t) .* (t >= 0);
F = @(s, t) exp(-s./RC) .* U(t-s);
X = @(t) integral(@(s) F(s,t), 0, inf) ./ RC;
Xv = @(t) arrayfun(X, t);
fplot(Xv, [-1 1])
wow thats amazing.Its working.I spend the whole day yesterday but couldnt solve it.Thank you sooooooooo much Walter

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2018년 3월 31일

댓글:

2018년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by