No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Playing Cards Toolbox 1.0

4.2 | 4 ratings Rate this file 12 Downloads (last 30 days) File Size: 41 KB File ID: #7963 Version: 1.0
image thumbnail

Playing Cards Toolbox 1.0


Rasmus Anthin (view profile)


02 Jul 2005 (Updated )

Contains a card class for simple usage. Supports matrices of cards. 37 object methods.

| Watch this File

File Information

Easier to tell what this is by showing the contents file:
  Playing Cards Toolbox.
  Version 1.0 17-Jun-2005
  What's new.
    readme_card.txt - New features, bug fixes, and changes in this version.
    cardplot - Plots cards (non-object).
    solitaire - A solitaire game template of sorts.
  Card creation.
    card - Card object constructor.
    cards - Card matrix.
    deck - 13x4 Standard card deck.
    rcard - Random card matrix.
  Card tests.
    iscard - True for card objects.
    isjoker - True for joker cards.
    isup - True for face up cards.
    isvisible - True for visible cards.
  Relational operators.
    eq - Equal values. ==
    ne - Not equal values. ~=
    lt - Less than for values. <
    gt - Greater than for values. >
    le - Less than or equal for values. <=
    ge - Greater than or equal for values. >=
    horzcat - Horizontal concatenation. [,]
    vertcat - Vertical concatenation. [;]
  Card operations.
    change - Change value and suit.
    ctranspose - Flip card. '
    facedn - Turn card face down.
    faceup - Turn card face up.
    flip - Flip card.
    hide - Hide card.
    joker - Change to joker cards.
    show - Show card.
    suit - Set or show suit.
    value - Set or show value.
  Card arithmetics.
    sum - Sum or "weighted" sum of values.
    weight - Weighting card values.
  Card plotting and display.
    table - Creates a card table.
    delete - Deletes plotted card objects from table.
    deselect - Pick a card with the mouse.
    disp - Display card objects.
    display - Standard output for card objects.
    plot - Plots cards on a table.
    select - Put down picked card.
    slot - Card stacking slot.
  Card layout.
    csize - Size of card.
    cwidth - Width of card.
    layer - Set or show card layer.
    layout - A layout manager.
    position - Set or show card position.
    snap - Snap cards to grid.

The toolbox contain several examples in order to quickly get started.
The plot function uses the CARDPLOT utility.

Note: Refer to CARD/DISP for how to change the display format for cards on the std output.


MATLAB release MATLAB 5.2 (R10)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
31 Jul 2011 Jort Gemmeke

Thanks for the nice toolbox.

I have one bugfix: if you delete() a card twice, delete crashes with an error. The fix is to include a test in delete.m:

if ~isempty(c(i).h)

around the "if any..." conditional.

15 Mar 2011 jordiet23

12 Feb 2007 Ahmed Bajaberd

08 Apr 2006 CAL BOGGESS

Contact us