Defining variables inside of a function
Ältere Kommentare anzeigen
t = 0:0.1:2; y(t) = cos(2*t); Array indices must be positive integers or logical values.
My problem here is that I want to have the variable "t" known inside the parentheses beside "y" as a regular written function in Matlab but I can't figure it out I tried searching for it online and found nothing.
Akzeptierte Antwort
Weitere Antworten (1)
Stephen23
am 7 Okt. 2018
t = 0:0.1:2;
y = cos(2*t);
Kategorien
Mehr zu Common Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!