Sfoglia il codice sorgente

phase magnitude function

publish
Wouter Horlings 8 anni fa
parent
commit
c16bb871cc
2 ha cambiato i file con 19 aggiunte e 0 eliminazioni
  1. +2
    -0
      OOequipment/equiment_init.m
  2. +17
    -0
      OOequipment/phamag.m

+ 2
- 0
OOequipment/equiment_init.m Vedi File

@@ -0,0 +1,2 @@
fg = FunctionGenerator('10.0.0.3',1234,10);
sc = Oscilloscope('10.0.0.2',5025,2);

+ 17
- 0
OOequipment/phamag.m Vedi File

@@ -0,0 +1,17 @@
function [phase,magnitude] = phamag(wave1,wave2,frequency,T,length)
%PHAMAG Summary of this function goes here
% Detailed explanation goes here
wave = [wave1;wave2];
fft1 = fft(wave);


function g = phasefft(wave,length,T)
f = fft(wave);
g = abs(f(1:length/2+1)/length);
figure;
plot(f)
end

end


Loading…
Annulla
Salva