How to pull values from a variable to set as a new variable/column
古いコメントを表示
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 件のコメント
dpb
2023 年 1 月 23 日
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...
回答 (1 件)
Sulaymon Eshkabilov
2023 年 1 月 24 日
0 投票
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.
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!