Code Monkey home page Code Monkey logo

matlab-rico's Introduction

matlab-rico

Matlab library by Rico Picone, PhD.

Introduction

I'm using this as my general Matlab utilities repo. Mostly I write Matlab functions for dynamic systems analysis, control systems design, and graphics interaction with LaTeX and tikz.

Quick installation

Download or clone this repo. In an m-file, add the matlab-rico/rico directory to your Matlab path as follows.

addpath('WHEREVER-YOU-PUT-IT/matlab-rico/rico')

Now you should have the matlab-rico library functions and classes available.

Installing it as a Matlab Toolbox

Download the rico Toolbox file and open it in Matlab (usually a double-click on the file will work). Before it will work, you have to add the installation directory to your Matlab Path. First, open the menu Home > Add-Ons > Manage Add-Ons.

manage add-ons

Right-click on Toolbox rico and select Open Folder.

open toolbox directory

Click the file path <toolbox path> in the address bar, selecting it.

copy-directory

Copy it. In the Command Window, paste it into the following command.

addpath(genpath(<toolbox path>))

Still in the Command Window, lock it in for the future.

savepath

Sometimes I forget to update the Toolbox, so be warned that it may be out-of-date.

Getting started

Make a phasor or two!

p1 = phasor('pol',3,pi/2); % polar form
p2 = phasor('rec',4,5); % rectangular form

Now try some phasor arithmetic.

p3 = p1 + 2*p2
p4 = p1*p2

Check out the polar and rectangular forms of the results.

p3.pol
p3.rec
p4.pol
p4.rec

It also works with symbolics.

syms x y real
p5 = phasor('rec',x,y);
p6 = 3*p5^2;
p6.pol

This returns the following.

[ 3*x^2 + 3*y^2, 2*atan2(y, x)]

Cool, huh?

Docs etc.

The documentation is included in the docs directory. Specifically, see docs.pdf. The function and class files are in the rico directory and some of them include their own documentation, which can be accessed using help or doc as usual. For instance, we can see the included class documentation for the phasor class as follows.

help phasor

matlab-rico's People

Contributors

ricopicone avatar

Stargazers

Abhijeet avatar TSK avatar  avatar

Watchers

 avatar Arif avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.