How to pull values from a variable to set as a new variable/column
4 views (last 30 days)
Show older comments
I'm using CCO topographic profiles to create numerous beach profiles of chainage against elevation but want to plot them based on their regional ID/profile ID numbers.
Unfortunately the format of CCO topographic profiles means that all regional and profile ID's for one monitoring cell/transect are in one dataset, and I'm stuck trying to work out how to either set the profiles to start the next figure based on the change in regional ID (& add the value to the title) or split the regional ID value into the different values themselves.
The work I'm doing requires a large dataset so doing this manually is not feasible. I was looking into using for loops, however both reg_IDs and profile ID's contain characters and numbers so I was having issues with that also.
I've tried using the code uigetfile('*.txt') to load in the profiles by choice and have also tried using the multiselect tool to set the variables based on reg_ID values but I just get nothing.
I've attached an example dataset, any help would be greatly appreciated!!
1 Comment
dpb
on 23 Jan 2023
So what's the need, specifically?
There's no problem in using a grouping variable with the last 2-3 columns of the file but need to know what those are and which combination(s) to group by and then do what...
Answers (1)
Sulaymon Eshkabilov
on 24 Jan 2023
If understood your question correctly, to read this data file and sort out its content, readtable() would be a good strating point to import data and preserve its content.
0 Comments
See Also
Categories
Find more on Resizing and Reshaping Matrices 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!