Info

This question is closed. Reopen it to edit or answer.

how to find number of occurences of an event and match it to a condition of another signal event. I have sorted signal data, all integers except time.

1 view (last 30 days)
%now load all time aligned filtered data into one large array called %'sortedresults'
sortedResults = cell(numel(baselinetimeNew)+1,4);
sortedResults(1,:) = {'Time','ground_interlock_fcrm','max of lmlg_nlg_rmlg',...
'max of wow_nose_fcrm_s'};
sortedResults(2:end,1) = num2cell(baselinetimeNew);
sortedResults(2:end,2) = num2cell(ts_new_GRD_ILOK.data);
if ~err_gear
sortedResults(2:end,3) = num2cell(ts_new_LG.data);
else
sortedResults(2:end,3) = {0};
end
if ~err_wow
sortedResults(2:end,4) = num2cell(ts_new_WOW.data);
else
sortedResults(2:end,4) = {0};
end
%and in psuedo code I am trying to do this - going into the array sorted results find -
% SIGNAL STATES % % LG GRD ILOK WOW % 0 = gear unknown 0 = stopped 0 = in the air % 1 = GEAR UP 1 = low speed taxi 1 = on the ground % 2 = gear moving down 2 = hi speed taxi % 3 = GEAR DOWN 3 = in the air % 4 = gear moving up % % use DIFF or FIND commands for algo % % for all gear extensions - % FIND all instances where LG=3 and DIFF G.T.E. 1, and set % COUNT to number of instances % % find sortedResults(2:end,3)diff >=3 % for all gear retracts including jacked maint cycles- % FIND all instances where LG=1 and DIFF N.E. 0, % and set COUNT to number of instances % % for actual landings - % FIND all instances where LG=3 and DIFF G.T.E. 1, AND GRDILOK<3 and set % COUNT to number of instances
%Just learning Matlab so hope this is easy?

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!