Suppose that a file named sensordat contains information col
Solution
Function to get number of sensors and seconds of data recorded:
function [seconds, sensorCount] = countSize(a)
[row, col] = size(a);
seconds = row;
sensorCount = col - 1;
end
Function to get max and mean reading of each sensor:
function [maxSensor, MinSensor] = countSize(a)
maxAll = max(a); %gives max of each column
minAll = min(a); %gives min of each column
maxSensor = maxAll(1, 2:end); %remove data of first column
minSensor = minAll(1, 2:end);
end
Function to get SD of each sensor data:
function [sdSensor] = countSize(a)
sdAll = std(a); %gives the sd of each column
sdSensor = sdAll(1, 2:end);
end
since u are allowed to enter data through keyboad, use that, since reading data is file dependent. Without the file structure we cannot provide you a funtion to read the data.
