Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
C# QR Code Generator 4.0.2.2
Salesforce WordPress Customer Portal 3.2.0
Single Leg MLM 1.2.1
OzGIS 14.6
Quick Maps For Dynamics CRM 3.1
Job Board Software 4.2
PHP Real Estate Script 1.3.2
IP2Location Geolocation Database April.2019
dbForge Data Generator for Oracle 2.1
VisualNEO Web 2018.12.15
SentiMask SDK Trial 1.0.0
OrgChart JS 4.6.4
dotConnect for BigCommerce 1.8
FedEx Smart Shipping For Magento 1.0.0
Database Workbench Pro 5.6.2.311
Top Code
Job Board Software 4.2
AppControls 3.7.4
PileCard 1.0
ManageEngine ADAudit Plus 4.0
2D / 3D CAD Import .NET: DWG, DXF, PLT 8.0
Joyfax Broadcast 8.30.0225
ANSMTP SMTP email component 7.0
Polar SpellChecker Component 5.0
DBQwikEdit Pro 2.4
Javascript Code Improver 1.00
HTMLPad 2007 Pro 8.3
Oracle to MySQL database converter 4.0.1.6
JavaScript Spell Check 2.4
VISCOM Video Capture FLV MP4 SDK ActiveX 3.25
microOLAP Technologies LLC 1.9.6
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
A dice roller for Matlab 1.0
File ID: 85847






A dice roller for Matlab 1.0
Download A dice roller for Matlab 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 28
Submit Rating:
A dice roller for Matlab 1.0 Description
Description: SYNOPSIS: [total, details] = roll(str)

INPUT str: Dice to be rolled. XdY, where X and Y are scalars, rolls X
fair Y-sided dice. Both X and Y are necessary.
If str is empty or omitted, '1d20' is used as default.

ROLL replaces the dice expression(s) by the rolled result, and
then evaluates the string. This makes it possible to use any
function call as input to ROLL as long as the function name
does not contain the signature of a roll (i.e. a number
followed by the letter 'd' followed by a number). In practice,
if you use ROLL for games, you most likely need only + and -.

There is one special function, XdYbZ, that takes the best Z
rolls out of the X attempts. This is useful to generate
character abilities in role-playing games.

OUTPUT total: total of the roll
details: individual rolls (cell array with results for each
dice in the input

REMARKS (1) If no output is requested, results are printed to screen
(2) Thanks to John D'Errico for pointing out that it is possible
to use any function with roll (as long as it takes the
results of dice rolls as input)

EXAMPLES roll 2d6 rolls two 6-sided dice
roll 1d8+1d4-2 rolls a 8-sided dice, a 4-sided dice and subtracts
2 from the result
roll 1d2 rolls a 2-sided dice (i.e. a coin flip)
roll log(2^1d6) takes the natural logarithm of 2 to the power of
the result of the roll of a 6-sided dice.
roll 1+1 throws an error, because there are no dice to roll.

License: Shareware

Related: inputremarks, results, Array, output, requested, Screen, printed, Individual, rolldetails, Generate, attempts, Character, abilities, gamesoutput, roleplaying, errico, Power, logarithm

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 28



More Similar Code

This little helper function allows to obtain a string representation for Matlab class instances.
Main feature is that properties which are also objects are converted recursively.
The recursion level is represented by tab intendation.
The maximum depth is definable, but infinite loops are taken care of automatically.

For more detailed object analysis checkout the UIInspect (#17935) program, and for Java class...



Many large organizations use a "network license" for MATLAB, where users must be connected to the FLEXlm license server to run MATLAB. The total number of MATLAB users and users of specific toolboxes is limited by the license. In some...



A syntax highlighting Word macro for MATLAB m-files. This program provides syntax highlighting for MATLAB m-file code segments included in a Word document. This macro does not provide highlighting as-you-type, highlighting is performed for the...



This somewhat larger project allows to create comprehensive documentation for MatLab files and classes (including packages) using a doxygen filter named mtoc++.
Moreover, a tool/class named MatlabDocMaker allows to create the documentation...



Slides and demo files from the live webinar "Como aumentar a velocidade de aplicacoes MATLAB"



A Coding Convention for C Code is a multi-platform compatible script that makes it easier for us to read each other's code, here are a few guidelines to follow when writing C code.



A Growing market for Hosted web services is an online ASP.NET reference for all webmasters who go for hosted web services. You can refer on popular hosted service providers in terms of their costs, business values, production etc., You will come...



A Simple Solution for Implementing Customization to an Existing Web Site is a web based tutorial which gives detailed description about customizing your websites for the users. For example you can greet your site visitors with customized greeting,...



Create a restriction class for your ASP.NET application is an easy to learn tutorial in which the author discusses about the procedure for creating a restriction class which helps in eliminating the access of particular page by the users. The...



HOW TO: Create a Summary Row for a DataGrid in ASP.NET by Using Visual Basic .NET is an interesting article in which the author briefly describes about creating a summary row in the datagrid control using Visual Basic.NET. This article clearly...

User Review for A dice roller for Matlab
- required fields
     

Please enter text on the image