how to solve a problem associated with memory speed of computer ?

조회 수: 2 (최근 30일)
mohammad
mohammad 2014년 7월 30일
댓글: mohammad 2014년 7월 31일
first of all , i have a specific task that works at the expense of every possible combination of range , i already used a program that perform my purpose this code is :
clc
clear
a = input('Please, select your array: ')
b = a(:).'
c = length(b)
for d =1:c
if (d<c)
e{d} = nchoosek(b, d);
end
end
tt=cellfun(@(m) padarray(m,[0 max(cellfun(@(n) size(n,2), e)) - size(m,2)],'post'), e,'UniformOutput',0);
uu=cell2mat(tt([1:d-1])')
suu=size(uu)
uu(:,((suu(2))+1))=sum(uu')'
but i faced a big problem during the implementation of the program that this command :
e{d} = nchoosek(b, d) has failed to continue as result of the number of possible choices and number of selected choices and finally the limitations:
When b = nchoosek(n,k) is sufficiently large, nchoosek displays a warning that the resultmight not be exact. In this case, the result is only accurate to 15 digits for double-precision inputs, or 8 digits for single-precision inputs.
C = nchoosek(v,k) is only practical for situations where length(v) is less than about 15.
that's where my vector consist of the hundreds of numbers which i want to do this process on. when i run the program , then matlab is being busy until giving me out of memory error in a time and takes along time without implementation of the program then i am forced to out of the program . i looked for a solution by help "out of memory" but i failed to find any solution then i tried to use anther command that's
combnk(v,k)
but it takes along time without implementation of the program then i am forced to out of the program too please please please , i want to practical solution to perform a lot of processes like this for my work . If the solution depends on the capabilities of my computer tell me about that computer specifications which performs this program easily , quickly and immediately note that my computer specifications are : win 7 64 bit 4 GB RAM 2.3 cpu i3
  댓글 수: 4
mohammad
mohammad 2014년 7월 30일
please heeeeeeeeeeeeeeelp
mohammad
mohammad 2014년 7월 31일
can't any one help me ? please please help

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by