what to do when i get unrecognized function or variable

조회 수: 1 (최근 30일)
Sangamithrra S
Sangamithrra S 2021년 11월 10일
답변: Chunru 2021년 11월 10일
clear;
clc;
close all;
tmin=-3;tmax=5;dt=0.02;
t=tmin:dt:tmax;
y0=y(t);
y1=1.5*y(t);
y2=y(2*t);
y3=y(t-0.5);

답변 (1개)

Chunru
Chunru 2021년 11월 10일
You need to define the function y(t).
y = @(t) cos(t); % eg. y(t) = cos(t)
tmin=-3;tmax=5;dt=0.02;
t=tmin:dt:tmax;
y0=y(t);
y1=1.5*y(t);
y2=y(2*t);
y3=y(t-0.5);

카테고리

Help CenterFile Exchange에서 Install Products에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by