Question: In a horizontal matrix p = [ 0 0 0 0 0 0 3 5 7 2 8 9 2 3 0 0 0 0

In a horizontal matrix p =[000000357289230000006268418000003467729614286900000], each element is a recording of a temperature from a thermometer in a plant. Now, the plant runs multiple times in a day and the beginning of each run is defined by the last 0 temperature reading while the end of that run is definined by the first zero temperature reading. So this means that the first and last temp reading in a run will be 0. Given this information, write a matlab code that uses loops and indexing of the matrix p, to extract the data of the second run. After the loop provides the index of the second run, the indecies used to extract the data from 'p' should give the output of the second run as: run2=[062684180].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!