make one struct with two datasets

3 views (last 30 days)
I have two datasets and I want to make them in one struct just like the exmple in the photo that I uploded. how can I do it??

Accepted Answer

Star Strider
Star Strider on 17 Apr 2019
Try this:
data.features = rand(84, 1190);
data.labels = rand(84,1);
See the documentation on Create Structure Array (link) for an extended discussion.
Experiment to get the result you want.
  5 Comments
Star Strider
Star Strider on 18 Apr 2019
@Stephen — Thank you.

Sign in to comment.

More Answers (1)

Taha Alars
Taha Alars on 17 Apr 2019
how can I save the struct that I made to new mat file??

Categories

Find more on Variables in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!