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!