iam new to matlab.Iam not getting how to import .mat file which is in string form.pl help

댓글 수: 1

Jan
Jan 2013년 7월 1일
What does "in string form" exactly mean? Is this the file name or the file format, such that you can edit the file in any editor?

댓글을 달려면 로그인하십시오.

 채택된 답변

Guru
Guru 2013년 7월 6일

0 개 추천

A .MAT file in MATLAB is a binary file format that MATLAB uses which is a direct copy of its workspace. The recommended way to create a MAT file is using the SAVE command, as in:
A = rand(1,10)
B = 'Hello World'
save mymat.mat
You would then read A and B back to the MATLAB workspace from the MAT file by LOAD
clear % remove any variables from the workspace
load mymat.mat
While load can read in text files through the syntax that per isakson refers to, there are better ways MATLAB can read in text files to its workspace.
HTH

추가 답변 (1개)

per isakson
per isakson 2013년 7월 6일
편집: per isakson 2013년 7월 6일

0 개 추천

Try this:
S = load( filename, '-ascii' );
See load

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by