0
ftype = boolean([1,1,1,0]); 
% boolean indicator to select feature types

I have the code above, and the boolean() function is not working in my octave.

How can I convert Matlab's boolean() function to Octave function?

1
  • As you know, Octave is a Matlab's open source clone. but In Octave, thera are some incompatablility to matlab. Commented Jan 2, 2018 at 1:23

2 Answers 2

3

I'm not sure why you're using boolean. It's part of Simulink and pretty much does nothing other than call logical. You should just be using logical within Matlab, and Octave has equivalent syntax.

Sign up to request clarification or add additional context in comments.

Comments

3

Use this instead:

ftype = logical([1,1,1,0]);

whos ftype;

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        ftype        1x4                         4  logical

The logical function is supported by both Octave and Matlab:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.