Conversion from struct type to array
Show older comments
Hey I have a .mat file which contains ECG data.Where aa contains struct type [15x10000 double]. How can I convert aa into [somethingx1 double] so that I can calculate length of ECG signal ?
aa=load('ff.mat');
aa
4 Comments
This question is quite unclear.
In MATLAB struct is a common name for data of class struct , but it seems you are actually talking about a data of class double , not struct. Or do you have a struct containing some numeric data? If so, why don't you tell us something useful about the struct, such as its dimensions and the field names and what they contain?
You write that you want to calculate the length of the signal, but you have already written the length in the question: 15x10000. So if 10000 is the length of the signal, what else do you want to know? Or are you using another definition of length? Have you tried using size ?
Perhaps you are simply trying to extract some data from this double array: have you tried using MATLAB's rather powerful indexing options?
Because we cannot read minds or your computer screen, we have to rely on your description of the data and your objective working with it. Currently this is not adequate to know how to help you.
Fahim Feroje
on 7 Feb 2015
Edited: Fahim Feroje
on 7 Feb 2015
Fahim Feroje
on 7 Feb 2015
karima neffati
on 16 Jul 2019
fahim ,please what code you apply to find the 2D representtaion of your ecg signle, i have the same issue
Accepted Answer
More Answers (0)
Categories
Find more on Signal Attributes and Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!