MATLAB Answers

real simple -- spreadsheet parsing

10 views (last 30 days)
chang liu
chang liu on 27 Mar 2020 at 6:29
Commented: chang liu on 28 Mar 2020 at 4:10
got a spreadsheet with data like this , basically n by m matrix containing alpha-numerical values
i just want to reduce this to a numeric (double) matrix (2d array) containing only the middle number , i.e. the number that's in between the : and the (
like 1759, 1777,1755... the 4 digit number thats in the middle . i want to plot them out on a graph
the format is fixed
how do i do this

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 27 Mar 2020 at 7:01
You can use extractBetween() on the string array, and double() the result

  1 Comment

chang liu
chang liu on 28 Mar 2020 at 4:10
worked like a charm!

Sign in to comment.

More Answers (1)

chang liu
chang liu on 27 Mar 2020 at 6:33
since the format is fixed i was thinking maybe easy way is to just say ignore the first 6 or so characters, ignore the last 7 characters?
i am using importdata() and then convert to string by doing string()

  0 Comments

Sign in to comment.

Sign in to answer this question.