octave向量矩阵基本操作命令

这篇博客总结了Coursera机器学习课程中的Octave向量和矩阵的基本操作,包括创建、修改、查询和数学运算。例如,使用`size(a)`获取矩阵大小,`a(3,2)`获取特定元素,`a(3,:)`获取第三行,`a(:,2) = [1 2]`替换列等。此外,还介绍了元素级操作,如`a.^2`进行平方运算,以及矩阵拼接和转置等。" 112480961,10546606,高性能BLDC电机方案解析:稳定换向与负载控制,"['电机控制', '嵌入式开发', '无刷直流电机', '电机驱动', '微控制器']
摘要由CSDN通过智能技术生成

笔记总结自coursera的机器学习课程~
懒得中英文切换,就用我幼稚有限的英语写啦,反正~嗯哼嗯哼,这么简单的英语,以后我用到也一定看得懂 (- ^ -)
命令如下:

  • At first, we need to know, “;” means turn to the next line of the matrix in octave
  • a=[1 2; 3 4; 5 6] # a is a 3*2 matrix. If you do not want octave to print it out, add ; to the sentence
  • help functionName # print the docum about the function
  • hist() # draw a picture
  • size(a) # return a vector expressing the row and column of matrix a: row * column
  • size(a, 1) # give the row of matrix a
  • length(a) # usually a is a vector, and it return the number of vector a’s elements
  • pwd # show the current directories or the current path that octave is in
  • ls # list the directories
  • load fileName # load the file ( usually we should first enter where the file is with “cd” command)
  • who # show the variables created in octave
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值