日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

julia矩阵运算_Julia中的复数及其运算

發(fā)布時間:2023/12/1 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 julia矩阵运算_Julia中的复数及其运算 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

julia矩陣運算

Julia| 復(fù)數(shù) (Julia | Complex Numbers)

The syntax to represent the complex number in Julia is:

在Julia中表示復(fù)數(shù)的語法為:

Syntax:

句法:

A+Bim

Here, A and B are the values, and im is the global constant which is bound to the complex number i representing the principal square root of -1.

這里, A和B是值, im是全局常數(shù),該常數(shù)綁定到表示-1的主平方根的復(fù)數(shù)i上 。

Example 1:

范例1:

# Julia program to demonstrate the example # of complex numbers and operations on itprintln(1+2im) println((1+2im)+(2+4im))# variables x = 10+23im println("x: ", x) println("typeof(x): ", typeof(x))

Output

輸出量

1 + 2im 3 + 6im x: 10 + 23im typeof(x): Complex{Int64}

復(fù)數(shù)的各種運算 (Various operations on Complex Numbers)

Example 2:

范例2:

# Julia program to demonstrate the example # of complex numbers and operations on itx = 1+2im y = 2.34+78.909imprintln("x: ", x) println("y: ", y)# operations add = x+y sub = x-y mul = x*y div = x/y exp = x^2# printing println("add: ", add) println("sub: ", sub) println("mul: ", mul) println("div: ", div) println("exp: ", exp)

Output

輸出量

x: 1 + 2im y: 2.34 + 78.909im add: 3.34 + 80.909im sub: -1.3399999999999999 - 76.909im mul: -155.478 + 83.589im div: 0.02569885734584168 - 0.011910741155137315im exp: -3 + 4im

Reference: Julia Complex Numbers

參考: Julia復(fù)數(shù)

翻譯自: https://www.includehelp.com/julia/complex-numbers-and-operations.aspx

julia矩陣運算

總結(jié)

以上是生活随笔為你收集整理的julia矩阵运算_Julia中的复数及其运算的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。