new minimal example
new project: FSO stuff
This commit is contained in:
@@ -98,7 +98,6 @@ classdef Signal
|
||||
|
||||
end
|
||||
|
||||
|
||||
%% CONVERT TO Opticalsignal
|
||||
function o_sig = Opticalsignal(obj, options)
|
||||
|
||||
@@ -273,7 +272,6 @@ classdef Signal
|
||||
SignalCopy = [];
|
||||
ModifierName = class(CallingModifier);
|
||||
|
||||
|
||||
cell = {SignalType , TimeStamp , Length , SignalPower(1) , Nase, SignalCopy, ModifierName, ModifierCopy, Description};
|
||||
|
||||
obj.logbook = [obj.logbook; cell];
|
||||
@@ -363,8 +361,7 @@ classdef Signal
|
||||
options.fft_length = 2^(nextpow2(length(obj.signal))-9);
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
if options.normalizeToNyquist == 0
|
||||
[p_lin,f_Hz] = pwelch(obj.signal, hanning(options.fft_length), ...
|
||||
options.fft_length/2, options.fft_length, ...
|
||||
@@ -488,7 +485,6 @@ classdef Signal
|
||||
end
|
||||
|
||||
|
||||
|
||||
function move_it_spectrum(obj,options)
|
||||
arguments
|
||||
obj
|
||||
@@ -630,7 +626,6 @@ classdef Signal
|
||||
|
||||
case power_notation.W
|
||||
%pow = pow % Watt
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -668,7 +663,7 @@ classdef Signal
|
||||
|
||||
%% PAPR of signal
|
||||
function papr_db = papr_db(obj)
|
||||
%PAPR The peak-to-average power ratio (PAPR) is the peak amplitude squared (giving the peak power)
|
||||
% PAPR The peak-to-average power ratio (PAPR) is the peak amplitude squared (giving the peak power)
|
||||
% divided by the RMS value squared (giving the average power).[1] It is the square of the crest factor.
|
||||
% papr = max(abs(timesignal))^2 / rms(timesignal)^2; ODER papr = peak2rms(sig)^2;
|
||||
|
||||
@@ -722,7 +717,7 @@ classdef Signal
|
||||
|
||||
end
|
||||
|
||||
%%
|
||||
%%
|
||||
function [obj,S,inverted,sequenceFound,sequenceStarts] = tsynch(obj,options)
|
||||
% time sync and cut
|
||||
arguments
|
||||
@@ -732,14 +727,11 @@ classdef Signal
|
||||
options.debug_plots = 0;
|
||||
end
|
||||
|
||||
|
||||
|
||||
S = {};
|
||||
inverted = -1;
|
||||
sequenceFound = 0;
|
||||
sequenceStarts = [];
|
||||
|
||||
|
||||
%normalize the signal
|
||||
a = obj.normalize("mode","oneone").signal;
|
||||
|
||||
@@ -777,8 +769,6 @@ classdef Signal
|
||||
findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend')
|
||||
end
|
||||
|
||||
|
||||
|
||||
shifts = lags(pkpos);
|
||||
sequenceStarts = shifts;
|
||||
shifts = shifts(shifts>=0);
|
||||
@@ -831,7 +821,6 @@ classdef Signal
|
||||
|
||||
end
|
||||
|
||||
|
||||
%%
|
||||
function obj = filter(obj,a,b)
|
||||
|
||||
@@ -921,6 +910,7 @@ classdef Signal
|
||||
|
||||
|
||||
end
|
||||
|
||||
%%
|
||||
function eye(obj,fsym,M,options)
|
||||
|
||||
@@ -981,8 +971,8 @@ classdef Signal
|
||||
maxA = max(sig(100:end-100))*1.3;
|
||||
minA = min(sig(100:end-100))*1.3;
|
||||
|
||||
maxA = 0.12;
|
||||
minA = -0.08;
|
||||
% maxA = 0.12;
|
||||
% minA = -0.08;
|
||||
|
||||
difference= maxA-minA;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user