Filter löschen
Filter löschen

what to do when i get unrecognized function or variable

2 Ansichten (letzte 30 Tage)
Sangamithrra S
Sangamithrra S am 10 Nov. 2021
Beantwortet: Chunru am 10 Nov. 2021
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);

Antworten (1)

Chunru
Chunru am 10 Nov. 2021
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);

Kategorien

Mehr zu Install Products finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by