matlab program
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: matlab program

  1. #1
    Join Date
    Nov 2013
    Posts
    2

    matlab program

    Can we make some program in matlab like this?

    URL Download Link disabled......
    Last edited by GremlinSA; November 27th, 2013 at 12:33 AM. Reason: Link disabled..

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: matlab program

    Please DO NOT link to EXE files..

    Rather explain what your looking to do.....
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  3. #3
    Join Date
    Nov 2013
    Posts
    2

    Re: matlab program

    I have this little game
    Code:
    % minimalistic rock, paper, scissors game
    % W. Schleter  July 28, 2003
    clear all; close all; clc;
    
    irock = 1; ipaper = 2; iscissors = 3;
    iwin = 1; itie = 2; ilose = 3;
    wintext = {'you win','we tie','you lose'};
    itemtext = {'rock','paper','scissors'};
    win = [itie ilose iwin
           iwin itie ilose
           ilose iwin itie];
    totals = [0 0 0];
    
    while (1)
        a = input('Enter R, P, S, or Q: ','s');
        iuser = strfind('RPSQ',upper(a));
        if (isempty(iuser) || iuser<1 || iuser>4)
            fprintf('Huh?\n')
        else
            if (iuser==4), break; end
            icomputer = floor(rand(1)*3+1);
            iresult = win(iuser,icomputer);
            fprintf('  You chose %s, I chose %s, %s\n', ...
                char(itemtext(iuser)),char(itemtext(icomputer)), ...
                char(wintext(iresult)));
            totals(iresult) = totals(iresult)+1;
            fprintf('  Your stats: Games: %.0f, wins: %.0f, ties: %.0f, losses: %.0f\n\n',sum(totals),totals);
        end
    end
    And I just want to plot the statistics in figure.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center