Magic and Trace Function

1 次查看(过去 30 天)
Hi, I was amaze to see following output: >> A=[2 3; 4 5]
A =
2 3
4 5
>> trace(A)
ans =
7
>> trace A
ans =
65
Que: Why am I getting answer of trace A as 65??
(ASCI Value of A is 65)

采纳的回答

Wayne King
Wayne King 2012-9-14
编辑:Wayne King 2012-9-14
That's because the functional form you are using when you enter
>>trace A
is executing
>>trace('A')
and in this case, it is nothing more than
>>sum('A')
Just like
>>help conv
is the same as
>>help('conv')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by