瀏覽代碼

phase magnitude function

publish
Wouter Horlings 8 年之前
父節點
當前提交
c16bb871cc
共有 2 個文件被更改,包括 19 次插入0 次删除
  1. +2
    -0
      OOequipment/equiment_init.m
  2. +17
    -0
      OOequipment/phamag.m

+ 2
- 0
OOequipment/equiment_init.m 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存