Pārlūkot izejas kodu

phase magnitude function

publish
Wouter Horlings pirms 8 gadiem
vecāks
revīzija
c16bb871cc
2 mainītis faili ar 19 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      OOequipment/equiment_init.m
  2. +17
    -0
      OOequipment/phamag.m

+ 2
- 0
OOequipment/equiment_init.m Parādīt failu

@@ -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 Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt