Matlab column extraction sematics
Show older comments
I'm learning Matlab and taking the Signal Processing Onramp. Can someone explain the difference between the two statements below
form1 = quakes(:,"WANC")
form2 = quakes.WANC
form1 returns a timetable with 2 columns, time and the WANC data column.
form 2 returns a column vector with just the WANC data.
quakes is a timetable with several columns, one of which is named WANC.
I should also note that the 2nd statement of these two fail which sort-of makes sense since quakes.WANC doesn't contain time info.
bandpass(quakes(:,"WANC"), [2 10])
bandpass(quakes.WANC, [2 10])
I expected form1 to be the same as form2. Is there some guide to datatypes and operations on them in Matlab that would cover this?
Accepted Answer
More Answers (0)
Categories
Find more on Matrices and Arrays 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!