How change x axis scale from array values into time?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hai, i have this code, and i woud like make x axis above graph, like x axis of picture bottom. Sin graph is correct in time samples from bottom picture, but i want make signal with zeros, until f.e. 1*10^7 s., then sinusoid. How to change x axis scale from index values into time samples?
code:
clear all; close all; f = 14E6; % Input Signal Frequency T=1/f; fs=1000e6; dt=1/fs; Nper=10; % period tmax=Nper*T; lambda=3e8/f; %bangos ilgis metrais d=lambda/2 %atstumas tarp elementu t = [0:dt:tmax];%sinusinio signalo trukme x1=zeros(1,100); s1 = sin(2*pi*f*t); x1(1,100:814)=s1; figure(1); subplot(2,1,1); %x1 = awgn(x1,20); plot (x1); grid ('on'); subplot(2,1,2); plot(t,s1); grid ('on');
Thank for the tips, and help.
0 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!