saving signal values to a matrix
Afficher commentaires plus anciens
clear all; close all; clc;
fc = 4.5E9; fs=100E9; % Center freq, sample freq
a=1:1:100; b=2*a; % Count value (no. of pulses)
D = b' * 1e-9; % Pulse delay times
tc = gmonopuls('cutoff',fc); % Width of each pulse
t = 0 : 1/(fs) : 600*tc; % Signal evaluation time
yp = pulstran(t,D,@gmonopuls,fc);
plot(t,yp);
z=[t' yp']; %saving the time and amplitudes in a matrix
display(z); %to display the values of the matrix
_________________________________
when i used the "display(z)" function on matlab, the values generated were bogus.
But... when i change from display(z) to display(t) or display(yp) the corresponding values displayed were correct, so there's some problem when i'm saving the t & yp values to the matrix z.
could someone please help me in correcting this?
1 commentaire
Sinduri
le 1 Mai 2013
Réponses (1)
Youssef Khmou
le 1 Mai 2013
hi,
The display if made by factorizing the values of the matrix z :
try :
format long
display(z*1e+11)
% so the values are Z* 10^11
Catégories
En savoir plus sur Simulation, Tuning, and Visualization 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!