Matlab tools

(Difference between revisions)
 Revision as of 10:45, 28 April 2011 (view source) (→Figure Positioning Tool)← Older edit Current revision as of 11:45, 11 March 2014 (view source)S081616 (Talk | contribs) (16 intermediate revisions not shown) Line 1: Line 1: - === Figure Positioning Tool === + === Matlab === - ====Description:==== + - A tool to facilitate positioning of figures on a certain location on the screen. + - ====Usage:==== + The following two tools are very useful when creating figures for scientific publications. They give you full control on figure size, margins, font, font size, etc, etc. - Position the figure with number ''fignr'' at a desired location. Run the function pos(''fignr'') in the command prompt of matlab. This will copy a command similar to + - ''set(1,'position',[1400 530 560 420]);'' + - to your clipboard. Next, paste this line after the figure(''fignr''); command in your m-file (use CTRL-V). The next time you run the m-file, the figure will be positioned at the desired location. + - ====File:==== + * [[Figure Print Preparation Tool]] (setplot.m) - pos.m + - ====Code:==== + * [[Figure Saving Tool (PDF and EPS)]] (saver.m) - function pos(fig) + Tool to set the position and size of figures on your screen. Usefull when you want to position figures side by side every time you run your m-file. - posvec=get(fig,'position'); + - clipboard('copy', ['set(',num2str(fig),',''position'',[',num2str(posvec(1,1)),' ',num2str(posvec(1,2)),' ',num2str(posvec(1,3)),' ',num2str(posvec(1,4)),']);'  ]) + * [[Figure Positioning Tool]] (pos.m) - disp(['Clipboard contains: ' clipboard('paste')]); + - disp('Paste this after your figure(fig); command in your m-file.'); + Tools to make nice Bode and Nyquist plots for articles and reports + + * [[Frequency Response Function Plotting]] (frf.m) + * [[Nyquist plot, with only positive frequencies and 6dB circle around -1 point ]] (nyquist2.m) + + Mass-spring-damper models (arbitrary number of masses) + + * [[Mass-spring-damper models]] (mkdsys.m) + + ShapeIt - Loopshaping Controller Design Tool + + * [[Home of ShapeIt]] + + === Simulink === + + Discrete time controller blocks, on the Matlab command prompt use make.m to mex the c-files first. Command "dctools" will open a template model with the controller filters. Drag and drop them from the template model to your own model. The discrete-time implementation of the blocks has been based on "Tustin-with-prewarping". The prewarping frequency has been chosen with respect to the respective block function, e.g. for a pure notch filter the prewarping frequency is equal to the notch frequency. + + * [[File:Dctools.zip]] + + Good old single axis 3rd order reference generator of René van de Molengraft. + + * [[Ref3]]

Current revision as of 11:45, 11 March 2014

Matlab

The following two tools are very useful when creating figures for scientific publications. They give you full control on figure size, margins, font, font size, etc, etc.

Tool to set the position and size of figures on your screen. Usefull when you want to position figures side by side every time you run your m-file.

Tools to make nice Bode and Nyquist plots for articles and reports

Mass-spring-damper models (arbitrary number of masses)

ShapeIt - Loopshaping Controller Design Tool