Magic and Trace Function

2 views (last 30 days)
Pritesh Shah
Pritesh Shah on 14 Sep 2012
Hi, I was amaze to see following output: >> A=[2 3; 4 5]
A =
2 3
4 5
>> trace(A)
ans =
>> trace A
ans =
Que: Why am I getting answer of trace A as 65??
(ASCI Value of A is 65)

Accepted Answer

Wayne King
Wayne King on 14 Sep 2012
Edited: Wayne King on 14 Sep 2012
That's because the functional form you are using when you enter
>>trace A
is executing
and in this case, it is nothing more than
Just like
>>help conv
is the same as

More Answers (0)


Community Treasure Hunt

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

Start Hunting!