⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exp_basic.m

📁 MATLAB Tutorial : For the beginners in MATLAB, this example code will provide a great jump start.
💻 M
字号:
% clear variable
clear x y z
clear all
% Garbage collection
pack
% If the OUT OF MEMORY error message is encountered, there is
%    no more room in memory for new variables
    If the OUT OF MEMORY error message is encountered, there is
    no more room in memory for new variables
% load
load filename
load filename x y z
% Save
save filename
save filename x y z
% uses 8-digit ASCII form instead of binary.
save filename -ascii 
% to exit from Matlab
quit or exit
% DOS
dos('dos command')
% copy files
copyfile(source,destination)
% delete
delete filename
% make directory
mkdir name
% directories in path
path
addpath ......
rmpath ...

% To display message
disp('Matlab')

% File open
FID = FOPEN(FILENAME,PERMISSION,MACHINEFORMAT)
file identifier FID
fid=fopen('data1.mat','wt+','n');
        'r'     read
        'w'     write (create if necessary)
        'a'     append (create if necessary)
        'r+'    read and write (do not create)
        'w+'    truncate or create for read and write
        'a+'    read and append (create if necessary)
           
        'n' - local machine format  
        
% Close file           
fclose(fid);

% Print file   
% precision fields
FPRINTF(FID,FORMAT,DATA)
fprintf(fid,'%3.0f\t %2.4f\t %1.3f\t  \n', data_rec(ii,:));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -