In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what are the grammar rules in matlab". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "what are the grammar rules in matlab".
Features and functions of Matlab
Matlab is an interactive software system, enter a command, you can immediately get the result of the command Matlab symbol calculation function
Drawing function of Matlab: Matlab provides rich drawing commands, which is very convenient to realize data visualization.
The programming function of Matlab: Matlab has the characteristics of program language such as program structure control, function call, data structure, input and output, object-oriented, etc., and it is easy to learn and high programming efficiency. Programming through Matlab to accomplish specific tasks
Matlab's rich toolkit (toolbox)
Simulink dynamic Simulation Integrated Environment based on Matlab
Matlab help system
Help displays short instructions for the use of the specified command
Doc displays the help page for the specified command as a web page
Lookfor queries commands related to it by specified keywords
Which displays the directory where the specified function is located
> > help eig
> > doc eig
> > lookfor inverse
> > which eig
Cd 、 dir 、 more
4. Matlab variable
Principle of variable naming
Starting with a letter or underscore can be case-sensitive with letters, numbers, and variable names of no more than 63 characters (up from 19 before version 6.5).
The usual form of a Matlab statement
Variable = expression
An expression is an expression that connects the relevant operands with an operator, and the result is assigned to the variable to the left of the assignment sign "="
The role of semicolons and line continuation characters
If you do not want to output the results on the screen, you can add a semicolon at the end of the statement. If the statement is very long, you can use the continuation character. " (three dots) continue the line; it is better to leave a space in front of the continuation
Query of variables
Who displays all variables in the workspace whos to view the detailed properties of variables in the workspace
System predefined variable
Pi: pi $\ pi$inf,Inf: infinite nan,NaN: Not-a-Number, an indeterminate value, such as 0/0eps: relative accuracy of floating-point operation iMagazine j: imaginary unit special variable ans-- try to avoid reassigning predefined variables to the system.
Mathematical operator
+ addition-subtraction * multiplication / and\ division (right division and left division) ^ exponentiation command separator: comma and semicolon
Output format
Matlab performs all operations with double precision, and the results can be output on the screen and assigned to the specified variable at the same time; if no variable is specified, the system will automatically assign the result to the variable "ans" the output format of the number in Matlab can be specified through the format command format only changes the output format of the variable, but will not affect the value of the variable!
Storage of variables
Save file name variable name list variable name list variables in the list are separated by spaces
Reading of variables
Load mydata A x extracts the specified variable from the data file clears the variable in the current workspace clear A x clears the specified variable
A few tips
Matlab command memory function: up and down arrow keys (first enter the first few characters of the command, and then press the up and down keys to narrow the search) command completion function: Tab key to delete the command line above is "what are the grammar rules in matlab?" all the contents of this article, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.