Using logic to extract cells from another matrix

2 ビュー (過去 30 日間)
Thallon Pitchure
Thallon Pitchure 2020 年 9 月 24 日
コメント済み: Thallon Pitchure 2020 年 9 月 24 日
I am trying to create a matrix by using logical operators. I have a time (frame number) column and two other variable columns (x,y)
I used the operators to determine a threshold and that returned the original matrix size.
After using the operators i have a new column matrix of 103 from my first variable.
The second variable didnt not have any numbers that fit out of the threshold so I got a column matrix of all zeros.
Next I found all the frames in which the x variable had a 1. So for time (Frame number) and my x variable I have a 103x1 column matrix.
My question is how can I use the frame number to create a column matrix with my corresponding y variable to get a 103x1 matrix so my matrix sizes match.
I am plotting the unedit x,y variable, then using the hold on command to plot all the values that deviate from the threshold limits over my exisitng plot.
Mx = median(COPD_data.AnteriorPosteriorSway_mm_) %median(Sortx)
My = median(COPD_data.MedioLateralSway_mm_) %median(Sorty)
Basex_plus = Mx+5 %mm
Basex_minus = Mx-5
Basey_plus = My+5 %mm
Basey_minus = My-5
Adjust_FN = COPD_data.FrameNumber(COPD_data.AnteriorPosteriorSway_mm_ >= Basex_minus &...
COPD_data.AnteriorPosteriorSway_mm_ >= Basex_plus)
Adjust_AP = COPD_data.AnteriorPosteriorSway_mm_(COPD_data.AnteriorPosteriorSway_mm_ >= Basex_minus &...
COPD_data.AnteriorPosteriorSway_mm_ >= Basex_plus)
Adjust_ML = COPD_data.MedioLateralSway_mm_(COPD_data.MedioLateralSway_mm_>= Basey_minus &...
COPD_data.MedioLateralSway_mm_>= Basey_plus)
plot (Adjust_AP,COPD_data.MedioLateralSway_mm_, 'r--')
Thank you in advance for the help!
  2 件のコメント
Rik
Rik 2020 年 9 月 24 日
This time I edited your question for you. Next time, please use the tools explained on this page to make your question more readable.
Thallon Pitchure
Thallon Pitchure 2020 年 9 月 24 日
Thank you

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by