Here are some new examples and applications that I have added to my website. They try to clarify the use of some instructions and functions in Matlab. I hope you find them useful...

Video demonstration of how a Matlab GUI is created, drag-and-drop capabilities, and callback functions introduction...

Example of the formulas to calculate power factor correction capacitors. These diagrams show the relationship of...

In this article we’re going to develop another computerized card trick using callback-functions in Matlab GUIs. I strongly suggest you read the first and second articles in this series, to know how to start and how to use the very important three instructions ‘get’, ‘set’ and ‘guidata’...

WinSpice Simulator driven from Matlab. In this article, a Matlab routine to drive the WinSPICE simulator is presented. This method can be easily adapted to simulate any circuit entered in a fully parameterized manner. The performance of the Matlab driver is illustrated by simulating a simple amplifier...

This experiment explores line detection (image analysis) with Matlab...

Continue reading "Line detection - working images with Matlab..."

Fourier analysis has many applications in science, physics, digital signal processing, imaging, numerical analysis, acoustics... Let's use math software to...

Continue reading "Fourier Analysis - introduction from a practical point of view"

The 3D plot functions intended for plotting meshes and surfaces 'mesh' and 'surf', and their several variants 'meshc', 'meshz', 'surfc', and 'surfl', take multiple optional input arguments, the most simple form being 'mesh(z)' or 'surf(z)', where z represents a matrix. See these examples...

Polynomials are used so commonly in algebra, geometry and math in general that Matlab has special commands to deal with them. The polynomial 2x4 + 3x3 − 10x2 − 11x + 22 is represented in Matlab by the array [2, 3, -10, -11, 22] (coefficients...

We'll demonstrate how to work out polynomial regression in Matlab (also known as polynomial least squares fittings)...

Continue reading "Polynomial Regression in Matlab - easy least squares fitting"

A periodic function repeats its values in regular periods or intervals. We explore codes for square and sawtooth waves without any special toolbox needed...

Continue reading "Periodic Function - some codes without special toolboxes in Matlab"

In this project, we are going to develop a GUI in Matlab to calculate the BMI (body mass index). We are going to introduce the radio button...

We are going to include the concepts in our Derivative function created before, to develop a Matlab function to calculate the gradient of a multidimensional scalar function. The function is going to have the following functionality...

This program calculates a polygon area, using Matlab. You must supply the x and y coordinates of all vertices. Coordinates must be entered in order of successive vertices...

This algorithm performs the t statistic and degrees of freedom for Student’s distribution, in Matlab code. The calculations can be based on any one of these three hypotheses...

Continue reading "T statistic - Student's t-distribution Test in Matlab"

This algorithm (code in Matlab) calculates the number of permutations and combinations of N objects taken D at a time. The full Matlab code is...

Continue reading "Permutations and Combinations - calculate its number in Matlab"

Create your first Scilab 3D Plot with these functions. See about plot3d, meshgrid and others...

How to calculate square feet - see this online converter for feet and inches...

Continue reading "Calculate Square Feet - online spreadsheet"

In this article we’re going to build-up a simple adder. Our adder (by means of relevant callback function s) is going to have two ‘edit text’ components, two ‘static text’ components, and one ‘push button’ element.

In this example, we study the Matlab plot 'stem' instruction to illustrate functions. It draws vertical lines (with little circles on the tip) proportional to the value of the function at that horizontal value...

Continue reading "Matlab Plot - using stems (vertical lines) for discrete functions"