I want to execute this code but there is an error in function command,please modify this program to get the output
Afficher commentaires plus anciens
function[X]= generateSin(a,f,ph,t,Fs)
f=5;
a=3;
ph=pi/2;
Fs=300;
T=1/Fs;
L=1000;tmax=L*T;
t=0:T:tmax-T;
X=a*sin(2*pi*t*f+ph);
figure()
plot(t,X)
end
2 commentaires
Alex Mcaulley
le 7 Juin 2019
This code works for me! What do you mean with "there is an error"?
Geoff Hayes
le 7 Juin 2019
sandhya - why does your function signature have input parameters which you then overwrite with
f=5;
a=3;
ph=pi/2;
Fs=300;
Réponses (0)
Catégories
En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!