Bläddra i källkod

phase magnitude function

publish
Wouter Horlings 8 år sedan
förälder
incheckning
c16bb871cc
2 ändrade filer med 19 tillägg och 0 borttagningar
  1. +2
    -0
      OOequipment/equiment_init.m
  2. +17
    -0
      OOequipment/phamag.m

+ 2
- 0
OOequipment/equiment_init.m Visa fil

@@ -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 Visa fil

@@ -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


Laddar…
Avbryt
Spara