Nali
Nali

Reputation: 157

How to store values from a dataset into an array in matlab

I have a dataset file called "data.mat", how can I store all the values in that into an array which I wanna name y or f(x) ?

The only thing I know is how to load it for example like this:

load('data.mat');

Upvotes: 0

Views: 139

Answers (1)

verbatross
verbatross

Reputation: 607

This will load all the values in the MAT file into the struct s, which I think is the behavior you want:

s = load('data.mat');

Upvotes: 1

Related Questions