geoscience-community-codes/GISMO

get(w,'Channel') returns different types

Opened this issue · 0 comments

I noticed a funky behavior today that was breaking my code. If a waveform object has multiple waveforms, then
get(w,'Channel')
returns a cell array that contains the string 'BH?'.
However, if the waveform object has 1 waveform, then
get(w,'Channel')
returns a string array.
I suggest that this function call always return a cell array. When looking at the return of a waveform that has 3 objects vs. a waveform that has 1, we cannot distinguish a difference by looking at size alone, since the string array for a channel is size 1x3. The user would need to test the type of the return.