Software Listing of Author : "Jonas"
- A dice roller for Matlab
- License: Shareware
- Price:


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...
- Platform: Matlab, Scripts
- Automatic template for new functions
- License: Shareware
- Price:


If you're tired of re-typing or re-copying the same header structure over and over, newFunction may be what you're looking for. In the command window, call newFunction myNewFunctionName or newFunction('myNewFunctionName') First, newFunction checks for whether there already exists another function with the same name. Second, an input dialog appears that requires you to enter a H1-line (one sentence description), and a synopsis (make sure you type the function name in the correct case! You can also already list explanations for input and output argument, and you can choose whether it'll be a function or a class. Third, newFunction asks for the save directory for the function. Fourth, newFunction creates the new function (or classdef) file with a header that includes the synopsis, the description of inputs and outputs (if provided),...
- Platform: Matlab, Scripts
- Map texture to patch
- License: Shareware
- Price:


SYNOPSIS: patchTexture(patchHandle,texture) INPUT patchHandle: handle to patch object texture: texture to map onto the surface defined via patch Texture can be a grayscale or an RGB image OUTPUT none - the texture is mapped onto the patch identified by patchHandle by reading the image at the [x,y] coordinates of the vertices of the patch. The vertex coordinates are rescaled so that a maximum of the image can be read. EXAMPLE [xx,yy,zz] = ndgrid(-100:100,-100:100,-100:100); img = xx.^2 + yy.^2 + zz.^2 < 99^2; img = convn(img,ones(5,5,5)/(5*5*5)); p = isosurface(img,0.5); ph = patch(p); set(gca,'visible','off') axis equal texture = imread('autumn.tif'); patchTexture(ph,texture) view(58,82) SEE ALSO patch, surface
- Platform: Matlab, Scripts
- Plot average line
- License: Shareware
- Price:


plotAverage adds an average line into plotted data. By default, plotAverage - calculates the average along y (for given or estimated points along x) - plots errorbars with the standard error of the mean - discards outliers to calculate the robust average - plots the average line into the data's axes (as opposed to a new figure) All these options can be changed. plotAverage returns the handles to the average line and the error bars as well as the x and y data of the line.
- Platform: Matlab, Scripts
