I have some difficulties on this code. I want to generate a 10 V constant signal, which function should I use? In this short passage I generate a sinusoidal signal, thanks for support
N= 500; %number of samples
Np= 3; %number of periods
%% Sampling
n=(0:N-1)'; %indices of samples
Fx= Np/N; %digital frequency
wt= 2*pi*Fx*n; %argument of periodic functions
%% Sinusoidal signal, mean 0
Vmax=10; %max value
x_sin = Vmax*sin(wt);figure(1)plot(n*Fx,x_sin)
Best Answer