I would add one variable inside function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Willim
am 10 Mär. 2019
Kommentiert: Willim
am 11 Mär. 2019
I have x(t) and I would to create x(t+ta) by matlab code. For example
if I have x(t)= 2t+3 , I need to create x(t+ta)= 2t+2ta+3 and so on.
Please consider x(t)=5sin(2t+theta), and x(t+ta)=5sin(2t+2ta+theta) for your explaintion.
Thank you in advance.
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 10 Mär. 2019
Bearbeitet: madhan ravi
am 10 Mär. 2019
syms a t theta
x(t)=5*sin(2*t+theta);
subs(x(t)*x(t+a),{t,a,theta},{1,2,3}) % t with value one ,a with 2 and theta 3 are example values
5 Kommentare
Weitere Antworten (1)
KALYAN ACHARJYA
am 10 Mär. 2019
Bearbeitet: madhan ravi
am 10 Mär. 2019
syms t ta theta
x(t)=5*sin(2*t+theta);
disp(x(t+ta))
Command Window
5*sin(2*t + 2*ta + theta)
2 Kommentare
KALYAN ACHARJYA
am 10 Mär. 2019
Bearbeitet: KALYAN ACHARJYA
am 10 Mär. 2019
Hello Faraj, you are doing wrong way, do the operation inside disp() only
Its giving the answer:
syms t ta theta
x(t)=5*sin(2*t+theta);
disp(x(t)*x(t+ta))
![tttt.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207702/tttt.png)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!