Results 1 to 3 of 3

Thread: n-1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User badboybadboy's Avatar
    Join Date: Mar:2008
    Location: sofia
    Posts: 10,496

    n-1

    , , . : ( ), , . , , ... , .
    : , Matlab( ). "" : =1 2 3 4, = 7 8 9. = 1 2 3 4 8 9 7, =1 2 3 4 7 9 8 ...
    n-1 . - . if- , switch.

  2. #2
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    :

    Code:
    skipElement = 0
    
    while needToDoTheEntireOperation:
        for i = 0 to b.Length-1:
            if i != (skipElement % b.Length):
                a.Add(b[i])
        skipElement += 1
    , Matlab , .
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  3. #3
    Registered User badboybadboy's Avatar
    Join Date: Mar:2008
    Location: sofia
    Posts: 10,496


    skipElement=0
    while " "
    for i=0 " b"-1
    if i "" skipElement b
    - b
    skipElement=skipElement+1
    end
    end
    end

    Matlab , .

    . :
    for i=1:size(b) % b a
    a(1,size(a)+i)=b(1,i);
    end

    for j=1:size(b)
    c=b(1,j); %c j- b
    d=a; %d
    d(1,size(a)+j)=[]; % (" " + j)- d
    ...
    end

    . - for while ?
    Last edited by badboybadboy; 10th December 2009 at 00:50.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |