宏记软件(十):Mathematica学习之提取矩阵元素和自定义函数-mathematica计算矩阵
分享兴趣,传播快乐,增长见闻,留下美好。
亲爱的您,
这里是LearingYard学苑!
今天小编为大家带来Mathematica学习之提取矩阵元素和自定义函数.
欢迎您的用心访问!
本期推文阅读时长大约5分钟,请您耐心阅读。
Share interest, spread happiness,
increase knowledge, and leave beautiful.
Dear you.
This is the LearingYard Academy!
Today, the editor brings Mathematica learning - extracting matrix elements and custom functions.
Welcome your visit!
The reading time of this tweet is about 5 minutes, please read it with patience.
Mathematica作为科学计算软件,支持数值符号计算,支持与图形系统、编程语言、文本系统等程序连接,是最受欢迎的数学软件之一。本期推文将介绍如何使用Mathematica提取矩阵元素和建立自定义函数。感谢您的观看!
Mathematica is one of the most popular mathematical software as scientific computing software that supports numerical symbolic computation and links to programs such as graphics systems, programming languages, and text systems. This tweet will introduce how to use Mathematica to extract matrix elements and build custom functions. Thanks for watching!
1. 提取矩阵元素
1.1 提取单个元素
Mathematica中提取单个元素的函数为(变量名)=A[[i,j]],A为矩阵,i为行,j为列。使用方法如下:
1. Extraction of matrix elements
1.1 Extracting Individual Elements
The function in Mathematica to extract individual elements is (variable name)=A[[i,j]], where A is the matrix, i is the row, and j is the column. It is used as follows.
1.2提取行元素
Mathematica内置函数提取行元素有两种方法:(变量名)=A[[i]],Take[A,{i}],i为行,A为矩阵。使用方法如下:
1.2 Extracting Row Elements
Mathematicas built-in functions extract row elements in two ways: (variable name) = A[[i]], Take[A,{i}], i is the row and A is the matrix. Use the following methods.
2. 自定义函数
自定义的函数表达式为f[args]:=value。args为变量,value为函数表达式。使用方法如下:
2. Custom Functions
The custom function expression is f[args]:=value. args is the variable and value is the function expression. The usage is as follows.
还有另一种方法f[args_]=value,需要注意的是这种方法,使用函数之前中不能对args进行赋值,否则将表达式右边变成常量。使用方法如下:
There is another method f[args_]=value, it should be noted that this method, the use of the function before the args can not be assigned to the value, otherwise the right side of the expression will become a constant. Use the following method.
今天的分享就到这里了。
如果您对今天的文章有独特的想法,
欢迎给我们留言,
让我们相约明天。
祝您今天过得开心快乐!
Thats it for todays sharing.
If you have a unique idea about today’s article,
welcome to leave us a message,
let us meet tomorrow.
I wish you a happy day today!
参考资料:谷歌翻译
本文由LearningYard学苑整理发出,如有侵权请在后台留言!
LearningYard学苑
文字 | clear
排版| clear
审核| 任务达人
以上就是关于《宏记软件(十):Mathematica学习之提取矩阵元素和自定义函数-mathematica计算矩阵》的全部内容,本文网址:https://www.7ca.cn/baike/64139.shtml,如对您有帮助可以分享给好友,谢谢。