From: Wendy on 28 Jan 2010 10:09 Hi all, If I have a vector a=[0 1 0 0 1]; I want change it to b=[1 0 1 1 0]; Is there a function for that in matlab? Thank you in advance, W.
From: Steven Lord on 28 Jan 2010 10:12 "Wendy " <wlq121(a)gmail.com> wrote in message news:hjs9ag$iue$1(a)fred.mathworks.com... > Hi all, > > If I have a vector a=[0 1 0 0 1]; > > I want change it to b=[1 0 1 1 0]; > > Is there a function for that in matlab? Either use NOT (if you're okay with b being a logical array) or MINUS with a as one of the inputs (if you want b to be a double array.) -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: classifying statistical descriptors Next: Document Bar Row |