Extract specific data from datalog

1 view (last 30 days)
John Åge Sundsethvik
John Åge Sundsethvik on 25 Oct 2020
Answered: Ameer Hamza on 25 Oct 2020
Hi, I have a long datalog matrix, and I wanna extract and display only 22nd, 23rd and 24th colum. How do I display only those?
I also wanna make a figure that dipslays the total diffrence over time. The 22nd row is the total number, 23rd is incomming and 24th row is outgoing numbers.
Any idea on how I can solve this?

Answers (1)

Ameer Hamza
Ameer Hamza on 25 Oct 2020
It will be efficient first to read the complete file and then extract these columns.
data = readmatrix('Feb15data.txt');
data = data(:, [22, 23, 24]);

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!