Defining variables inside of a function
古いコメントを表示
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.
採用された回答
その他の回答 (1 件)
Stephen23
2018 年 10 月 7 日
t = 0:0.1:2;
y = cos(2*t);
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!