JuliaPro learning notes( Day 1, 2019 Jun 17): how to plot & Gaussian elimination

JuliaPro learning notes( Day 1, 2019 Jun 17)

I am using JuliaPro 1.1.1.1 on atom on Mac Mojave, and JuliaBox.

Reminder for using atom: according to http://docs.juliaplots.org/latest/install/

To use Plot, we need to install some packages:
Pkg.add("Plots")
Pkg.add("PyPlot")
Pkg.add("GR")
Pkg.add("UnicodePlots")
Pkg.add("PlotlyJS")?This may fail but it doesn’t really matter.

The thing is, even after we install packages, we cannot plot on the Plot Pane?
No images are shown here

To solve this, we need to add pygui(true) in the code file or REPL panel. Then we press Run File on the left bar, boom:在这里插入图片描述
by the way my code is:

using PyPlot
pygui(true)
x = 1:100
y = sin.(x)+3cos.(x)
plot(x,y)
stem(x,y)

Here you may notice something. Yes, I am learning Linear Algebra using Julia as programming language. It is quite handy since the language is more like human tone and it has many characteristics of Matlab, which is great.

So here, the usage of x.^# and sin.(x) is to assign all the value of x (an array) to y. And stem is to show the points used to plot the figure.

Now that I am just starting to learn LA, about the Gaussian Elimination, I need to mention that:

A = [1 1 1; 2 5 1; 13 5 3]
b = [1, 3. 66]
x = A\b

A is a matrix and b is a vector (pay attention to how to write code). Then we can find x with it.

Cool cool ?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值