help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nonconformant arguments


From: Nicholas Jankowski
Subject: Re: nonconformant arguments
Date: Sun, 5 Apr 2020 09:28:48 -0400

On Sun, Apr 5, 2020, 12:18 AM Hamed Khatibi <address@hidden> wrote:

I want Xn to be the sum of all elements in o_vector matrix. In Matlab 2018 and newer versions the 
Xn = sum(o_vector,'all');
does this work. But octave doesn't support this. How can I do this in octave?

again, please don't top-post.
http://www.idallen.com/topposting.html


for now, you can replace  
>> sum(o_vector,'all')

with
 
>> sum(o_vector(:))

that will work no matter the size or shape of o_vector.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]