Loop Function to index table and create new vairables

조회 수: 1 (최근 30일)
Patrick Lonergan
Patrick Lonergan 2021년 6월 4일
댓글: Bob Thompson 2021년 6월 4일
Hi,
I am looking to try and create seperate tables for differen failure events.
I have filtered each failure event using the find function;
Ones=find(array>0.5);
I now want to creat several tables of the measure parameters (newtimetable) based on the identified rows in vairable (Ones). I was thinking of using a for loop, but cant seem to get it to work. If I was to do it manually for each table the code would be:
a=10
a1=Ones(1,1);
Event1=newTimetable((a1-a):a1,:);
a2=Ones(2,1);
Event2=newTimetable((a2-a):a2,:);
I hope that makes sense and open to any suggestions or methods
  댓글 수: 1
Bob Thompson
Bob Thompson 2021년 6월 4일
Are you getting a specific error message when you perform the for loop? How do you know it's not working?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by