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
.Net VCL for Delphi 1.0.0.0
ASP. NET C# PDF Software 4.5
LinqConnect Professional 4.8
CAD VCL: 2D/3D CAD in Delphi/C++Builder 14
wolfSSL 3.15.7
CAD DLL 14
AnyStock Stock and Financial JS Charts 8.4.2
ODBC Driver for SQLite 2.4
dotConnect for SugarCRM 1.7
dbForge SQL Complete 5.9
dbForge Studio for MySQL 8.0
.Net Runtime Library for Delphi 6.0.4.0
Scimbo 1.64
AnyMap JS Maps 8.4.2
GetOrgChart 2.5.3
Top Code
Ticket Booking System 1.0
CPP-2-HTML CSS Source Code Tagger 1.02
GNU Common C 2.3.2
College Management System Script 1.0.4
Simple Hill-Climbing 1.0
.Net VCL for Delphi 1.0.0.0
MCU 8051 IDE 1.4.7
Java API for Java code generation 1.0
Network-Integrated Multimedia Middleware 2.2.0
Simple Webinterface Shopsystem for Shopping Carts 0.4
Online Food Ordeing System 1.0
Visual FoxPro Functions/Class Libary 100
BSW Ads Manager 1.0
Jigsaw Java Applet 1.0
Skincare Management System 1.4
Top Rated
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
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
ATN Mall 2.0
WeBuilder 2015 13.3
PHP Digital Download Script 1.0.4
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