Import a specific structure with numbers in MATLAB
Show older comments
Hi!
I have txt file with numbers. This numbers are given inside the specific form. Example: XY={{0.3`,0.38237129451839642`},{0.4`,0.43291827234382921`}{0.5`,0.34291723195213023`}};
I would like to import this numbers in MATLAB workspace and get something like this: a=[0.3, 0.4, 0.5]; b=[0.38237129451839642, 0.43291827234382921,0.34291723195213023];
Keep the number of decimal places is necessary.
What is the best way to achieve this? Thank you!
1 Comment
Stephen23
on 27 Feb 2017
@Dejan Hrovatin: please edit your question and upload a sample file by clicking the paperclip button.
Accepted Answer
More Answers (0)
Categories
Find more on Text Files 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!