目前分類:Matlab (13)

瀏覽方式: 標題列表 簡短摘要

In this example , we want to tell you how to replace specific number of array.

Assume we have follow matrix , and we want replace 0 to -1 ;

JerryCheng 發表在 痞客邦 留言(0) 人氣()

In Matlab , there are two method to concatenate string .

 

JerryCheng 發表在 痞客邦 留言(0) 人氣()

It is different with the plot function , we can use axis() to adjust the x-axis ,
but it does not work in histogram.
so , Matlab has provided anothoer method as follow:
x = 0:1:4;
y = randn(10000,1);
hist(y,x) 
 
x = 0:1:4 ;
It means that the range of x-asis is from 0 to 4 , and the distance between each column is 1.

JerryCheng 發表在 痞客邦 留言(0) 人氣()

We can use the function , ezplot() , to achieve the purpose.

for example :

JerryCheng 發表在 痞客邦 留言(0) 人氣()

period character , 也就是 . 運算子 ,

他區隔兩個運算是矩陣運算或是單純的array運算 , 

JerryCheng 發表在 痞客邦 留言(0) 人氣()

在Matlab中有一些內建變數 , 像是:

eps

JerryCheng 發表在 痞客邦 留言(0) 人氣()

The standard form of quadratic programming is 1/2*x'*H*x + f'*x .

In Matlab , we can use the function , quadprog( H,f ) , to solve the quadratic programming problem.

JerryCheng 發表在 痞客邦 留言(0) 人氣()

fr = fopen('inputFile.txt','r');

for i=1:numOfpoint

JerryCheng 發表在 痞客邦 留言(0) 人氣()

 在Matlab中 , 一般的element我們可以使用array來進行儲存 , 

但是如果element是一個個的array , 我們則可以藉由cell array 

JerryCheng 發表在 痞客邦 留言(0) 人氣()

If we want to input data into array in Matlab , we can use the function as below:

input('message');

for example :

JerryCheng 發表在 痞客邦 留言(0) 人氣()

How to get the size of a Matrix

Assume L is a 2-dimensional Matrix ,

JerryCheng 發表在 痞客邦 留言(0) 人氣()

1. vector for polynomial

2. sym for polynomial

文章標籤

JerryCheng 發表在 痞客邦 留言(0) 人氣()

size()

  會傳回一個矩陣的row and column,若是圖片則會傳回3個值,

JerryCheng 發表在 痞客邦 留言(0) 人氣()