I am using this block of code to get all the combinations of the rows of a matrix as I have to apply brute force.

You are watching: Maximum variable size allowed by the program is exceeded.

function combinations(training)S=dec2bin(1:2^size(training,1)-1)=="1";allSubsets=cell(size(S,1),1);for i=1:size(S,1) allSubsetsi=training(S(i,:),:); display(allSubsetsi)endendIf I run this function on a small matrix of lets say 7 or even 20 rows it works perfectly fine. But once I increase the size of the matrix to 25 it gives me this error.

Out of memory. Type HELP MEMORY for your options.

Error in dec2bin (line 55) s=char(rem(floor(d*pow2(1-max(n,e):0)),2)+"0");

Error in combination (line 11) S=dec2bin(1:2^size(training,1)-1)=="1";

Moreover, when I increase the number of rows up to 120 it gives me the following error :/

Maximum variable size allowed by the program is exceeded. Error in combination (line 11) S=dec2bin(1:2^size(training,1)-1)=="1";

I have to run this on a data of 2000 rows having 69 columns. Please help!!


matlab combinations
Share
Improve this question
Folshort
edited Nov 15 "17 at 14:06
Ali Hassan
asked Nov 15 "17 at 13:58
*

Ali HassanAli Hassan
133 bronze badges
4
Add a comment |

0


Active Oldesns Votes

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer


Thanks for contributing an answer to Stack Overflow!

Please be sure to answer the question. Provide details and share your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

See more: Westside Federation For Senior And Supportive Housing Community


Draft saved
Draft discarded

Sign up or log in


Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Submit

Post as a guest


Name
Email Required, but never shown


Post as a guest


Name
Email

Required, but never shown


Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy


Browse other questions tagged matlab combinations or ask your own question.


The Overflow Blog
Featured on Meta
Related
3
Matlab - Assignment into array causes error: "Maximum variable size allowed by the program is exceeded"
1
maximum size for an array in Matlab
1
Generating all possible combinations for selecting a particular number of rows in a large matrix
1
Maximum variable size allowed by the program is exceeded-MATLAB
0
MATLAB Error: Maximum Variable Size Allowed on the Device Is Exceeded
1
find the best combination of columns in a matrix
0
How to select a combination which gives me maximum accuracy of that row/combination?
Hot Network Questions more hot questions

Question feed
Subscribe to RSS
Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader.


*

lang-matlab
Stack Overflow
Productns
Company type of
Stack Exchange Network-related
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.9.22.40280


Stack Overflow works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.