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
Spire.PDF for Java 2.7.8
Database Workbench Pro 5.6.10.0
The C# PDF Library 2020.1.5
CAD-Viewer 3DVBVIEW V4
dotConnect for SQLite 5.15
LuaStudio 9.92
EntityDAC 2.3
Devart ODBC Driver for QuickBooks 2.0
phpEnter 5.1.
Udemy Clone script 2.01
VisualNEO Web 19.11.7
VisualNEO for Windows 19.4.29.0
SentiVeillance SDK Trial 7.3
Devart ODBC Driver for PostgreSQL 3.2
SecureBridge 9.2
Top Code
SecureBridge 8.0
dotConnect for SQLite 5.9
EntityDAC 1.6
Database Workbench Pro 5.6.10.0
ATN Site Builder 3.0
ATN Resume Finder 2.0
The C# PDF Library 1.0
Devart ODBC Driver for PostgreSQL 3.2
Aglowsoft SQL Query Tools 8.2
Classified Ad Lister 1.0
Solid File System OS edition 5.1
ADO.NET Provider for ExactTarget 1.0
Deals and Discounts Website Script 1.0.2
SentiVeillance SDK Trial 7.3
A-star Search Algorithm 1.1
Top Rated
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
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
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: 29
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: 29



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