由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - question about MATLAB matrix squaring
相关主题
How to write this query in Oracle?请教一道面试题啊!关于SQL的!
另一道陈题SQL combine two columns from two different tables no shared (转载)
请问个矩阵的问题Should I Answer These Questions Honestly?
Pivot table SOS (转载)[合集] WorldQuant phone interview
如何用matlab构造如下矩阵[合集] 继续作贡献,一道积分题。
问下有没有高手懂SNOPTFinance Jobs Salary Survey Results
请教面试题Knight Capital有个公司要让我做coding test
装Matlab出现如下错误 (转载) EXCEL VBA in real world
相关话题的讨论汇总
话题: tt话题: matlab话题: squaring话题: 000i话题: matrix
进入Quant版参与讨论
1 (共1页)
m****r
发帖数: 141
1
A question about MATLAB matrix squaring:
tt = [-2 -1; 0 1]
tt^2
tt^1
tt^3
tt^4
what are the output ? Any why the results are still negative ?
Thanks
k*******d
发帖数: 1340
2
手算都能算出来的为什么还要拿来版上讨论?。。或者开个Matlab算一算就完啦。。or
, am I missing sth here...
m****r
发帖数: 141
3
I have got all results.
But, I do not know why
tt^2 != tt*tt ?
what is the algorithm of tt^2 ?

or

【在 k*******d 的大作中提到】
: 手算都能算出来的为什么还要拿来版上讨论?。。或者开个Matlab算一算就完啦。。or
: , am I missing sth here...

c**e
发帖数: 4439
4
看到你说不一样 我很惊讶 算了下 是一样的啊
m****r
发帖数: 141
5
make some changes to tt,s values, you will see the difference.

【在 c**e 的大作中提到】
: 看到你说不一样 我很惊讶 算了下 是一样的啊
m****r
发帖数: 141
6
Thanks everyone's reply.
I know the difference between tt^2 and tt.^2.
I want to know why tt^2 != tt*tt ??? (attention: no dot here)
example:
tt= [-1, -2; 1, -1]
tt^2
tt*tt
tt =
-1 -2
1 -1
--> % this is tt^2
ans =
Columns 1 to 1
-1.0000e+000 +0.0000e+000i
-2.0000e+000 +0.0000e+000i
Columns 2 to 2
4.0000e+000 +0.0000e+000i
-1.0000e+000 +-0.0000e+000i
--> this is tt*tt
ans =
-1 4
-2 -1
another example:
tt =
-1 -2
0 -1
--> % this is tt^2
ans =
1 0
0 1
--> % this is tt*tt
ans =
1 4
0 1
Why are they different ?
Thanks

【在 c**e 的大作中提到】
: 看到你说不一样 我很惊讶 算了下 是一样的啊
k*******d
发帖数: 1340
7
This only reason I can think of is you have a corrupted Matlab installation,
or some setting is wrong on your Matlab. Try it on another computer or ask
on the Matlab forum.

【在 m****r 的大作中提到】
: Thanks everyone's reply.
: I know the difference between tt^2 and tt.^2.
: I want to know why tt^2 != tt*tt ??? (attention: no dot here)
: example:
: tt= [-1, -2; 1, -1]
: tt^2
: tt*tt
: tt =
: -1 -2
: 1 -1

1 (共1页)
进入Quant版参与讨论
相关主题
EXCEL VBA in real world如何用matlab构造如下矩阵
[合集] interview question问下有没有高手懂SNOPT
A hedge fund interview questions (CS)请教面试题Knight Capital
[合集] Anybody know the best answer?(programming)装Matlab出现如下错误 (转载)
How to write this query in Oracle?请教一道面试题啊!关于SQL的!
另一道陈题SQL combine two columns from two different tables no shared (转载)
请问个矩阵的问题Should I Answer These Questions Honestly?
Pivot table SOS (转载)[合集] WorldQuant phone interview
相关话题的讨论汇总
话题: tt话题: matlab话题: squaring话题: 000i话题: matrix