help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a difficult homework


From: shivax
Subject: Re: a difficult homework
Date: Tue, 27 Aug 2019 07:24:03 -0500 (CDT)

sorry .. I made a mistake in writing the code
The correct version is: 
(I recreated an exercise with the number of numbers of my work..this is a
test to show you that I can't run it for memory)


B=5000;
a1=fix(rand(B).*100);
 a=a1(:);
 b=1:(B*B-1);
 c=((1:(B*B-1)))+1;
size(b)
size(c)
 cc=uint16(a.*ones(1,numel(b)));

  %d=cc(b:end)
 g=uint16((1:rows(cc))'.*ones(1,numel(b)));
  g1=g>=b&g<=c;

 e=min(~g1.*max(cc).+g1.*cc)
error: out of memory or dimension too large for Octave's index type
error: called from
    prova2 at line 8 column 4

i used unint16..but the result is the same..:(

if i try this code with B=50 it runny perfectly



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]