Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Homework Help
Engineering and Comp Sci Homework Help
MATLAB, separate odds and evens from matrix
Reply to thread
Message
[QUOTE="RUber, post: 4991932, member: 524408"] I am not sure that mod is the best command to use for this purpose. You are just looking to split the matrix into 2 parts based on whether or not the index is odd or ever, right? You essentially want something that looks like: b = [8 -3 0 7 -6 -3 1 8 7 -2]; O=[1,3,5,7,9]; E=[2,4,6,8,10]; odd = b(O) even=b(E) The mod function was returning a logical index of whether or not the value was odd or even. [/QUOTE]
Insert quotes…
Post reply
Forums
Homework Help
Engineering and Comp Sci Homework Help
MATLAB, separate odds and evens from matrix
Back
Top