3.1 INPUT TO A SCRIPT FILE
3.1.1 The variable is defined and assigned a value in the script file.
3.1.2 The variable is defined and assigned a value in the Command Window.
3.1.3 The variable is defined in the script file, but a specific value is entered in the Command Window when the script file is executed
例如
variable_name = input(‘string with a message that is displayed in the Command Window’)
3.2 OUTPUT COMMANDS
3.2.1 The disp Command
disp(name of a variable) or disp(‘text as string’)
3.2.2 The fprintf Command
1.Using the fprintf command to display text:
fprintf(‘text typed in as a string’)
2.Using the fprintf command to display a mix of text and numerical data
fprintf(‘text as string %-5.2f additional text’,variable_name)
fprintf(‘..text...%g...%g...%f...’,variable1,variable2,variable3)
3.Using the fprintf command to save output to a file:
a) Opening a file using the fopen command
fid = fopen(‘file_name’,‘permission’)
b) Writing the output to the open file using the fprintf command.
fprintf(fid,‘text %-5.2f additional text’,variable_name)
c) Closing the file using the fclose command.
fclose(fid)
3.2.3 THE save AND load COMMANDS
1 The save Command
save file_name and save(‘file_name’)
save file_name var1 var2 and save(‘file_name’,‘var1’,‘var2’)
2 The load Command
load file_name or load(‘file_name’)
load file_name var1 var2 or load(‘file_name’,‘var1’,‘var2’)
3.2.4 IMPORTING AND EXPORTING DATA
variable_name = xlsread(‘filename’)
variable_name = xlsread(‘filename’,‘sheet_name’)
variable_name = xlsread(‘filename’,‘sheet_name’,‘C2:E5’)
xlswrite(‘filename’,variable_name)
分享到:
相关推荐
A Data Scientist's Guide to Acquiring, Cleaning, and Managing Data in R 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除
详细的介绍了PPP通讯,英文版的,找了好久才在一个论坛上找到的
Managing and Mining Uncertain Data 电子书 Edited by Charu C. Aggarwal
The Docker-Compose technology is examined and you will learn how it can be used to build a linked system with Python churning data behind the scenes and Jupyter managing these background tasks....
Matlab class for launching and managing asynchronous processes.zip
Managing and Mining Graph Data is a comprehensive survey book in graph data analytics. It contains extensive surveys on important graph topics such as graph languages, indexing, clustering, data ...
Many big data-driven companies today are moving to protect certain types of data against intrusion, leaks, or unauthorized eyes. But how do you lock down data while granting access to people who need ...
managing data mining advice
Graph mining and management has become an important topic of research re- cently because of numerous applications to a wide variety of data mining prob- lems in computational biology, chemical data ...
Measuring and Managing Credit Risk
Managing and Using of MySQL
Chapter 3 The Benefits and Challenges of Data Management Chapter 4 Real World Examples of Data Management Chapter 5 The Different Types of Data Analytics Chapter 6 They all Work Together: Data ...
PKI Implementing and Managing E-Security 学习PKI的好书
风险度量模型Modeling Measuring and Managing Risk电子书资源
developing and managing a successfull payment cards business
In this fully updated second edition of the highly acclaimed Managing Gigabytes, authors Witten, Moffat, and Bell continue to provide unparalleled coverage of state-of-the-art techniques for ...
Big data and the Internet of Things (IoT) are ultimately two sides of the same coin, yet extracting, analyzing and managing IoT data poses a serious challenge. Accordingly, proper analytics ...
Managing NFS and NIS
美国MBA BIS 专业教材,电子商务专业学生可以参考