Wiki

Clone wiki

srinivas.gs_mtools / Home

srinivas.gs_mtools

This repo contains some tools and extensions I wrote in MATLAB to make life simpler. I've included some description of some of the tools here, but documentation on most of them is missing.

This wiki describes some of these tools. More help is available inside each mfile.

oss.m

#!matlab
s=oss;

oss returns the correct slash based on the operating system. (/ for *nix, \ for Windows)

##oval.m##

#!matlab
s = oval(pi,2)
s =

3.14

oval accepts a number, rounds it to the specified number of significant digits, and returns a string. Useful for plotting.

Calling oval with a 'frac' flag makes it treat the input as a rational fraction, and returns the string you want.

#!matlab
oval(3/7,'frac')

ans =

3/7

multiplot.m

autoplot.m

PrettyFig.m

Just type

#!PrettyFig

PrettyFig

after plotting many things in a figure and it automatically makes it prettier to look at.

TrialPlot.m

struct2mat.m

Converts a struct into a matrix. obviously only works when your structure has numeric values.

Manipulate.m

Mathematica-style manipulation of function parameters.

Updated