Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

creating .mat files with variables

Asked by PK

PK (view profile)

on 25 Jan 2013
Accepted Answer by TAB

TAB (view profile)

hello all how can i create as .mat file with 4 variables in it of diff sizes like a=1x1 mtx,b=100x128mtx,c=116x128 mtx and d=1x128 mtx.

0 Comments

PK

PK (view profile)

Tags

Products

No products are associated with this question.

1 Answer

Answer by TAB

TAB (view profile)

on 25 Jan 2013
Accepted answer
a=10;
b=rand(100,128);
c=rand(116,128);
d=rand(1,128);
save('myfile.mat','a','b','c','d');

1 Comment

PK

PK (view profile)

on 26 Jan 2013

Is it possible to create one variable with the specific ranges like b=100x128 matrix in the range of [0.001 to 0.005]

TAB

TAB (view profile)

Contact us