Structure array and file operations
Show older comments
Hello,
I am reasonably new to MATLAB and am stuck on a question regarding structure arrays. So basically it wants me to get MATLAB to read data from a .txt file, and return values with a title, these values are number of triangles (1st value), height and width (alternating values, 2nd is height, 3rd width etc), along with this it also needs to calculate the area of the triangle. Now, this data is quite randomized but apparently Matlab will be able to read it. I've really only got the basics but I am guessing I will need to use fscanf and readf? The struct function is simple enough i just dont know how to mix the three. I have uploaded the question along with a photo of some of the data.


Thanks, Regards Steve
Accepted Answer
More Answers (0)
Categories
Find more on Data Import and Analysis 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!