Matlab examples - the blog...
https://www.matrixlab-examples.com/matlab-blog.html
In this blog I propose some interesting Matlab exercises, examples and tutorials to cover powerful programming instructions to work with matrices, vectors and arrays.en-usmatlabSun, 18 Jul 2021 22:41:14 -0400Sun, 18 Jul 2021 22:41:14 -0400matrixlab-examples.comCreate Matlab GUI - video
https://www.matrixlab-examples.com/matlab-gui-3.html3863f30778f12619945952db2545ae4eVideo demonstration of how a Matlab GUI is created, drag-and-drop capabilities, and callback functions introduction...Wed, 20 Mar 2019 00:03:13 -0400Power Factor Correction Capacitors
https://www.matrixlab-examples.com/power-factor-correction-capacitors.htmlcb71cd7be8e907adde8520ecf2507dc0Example of the formulas to calculate power factor correction capacitors. These diagrams show the relationship of...Tue, 19 Mar 2019 23:22:37 -0400Card Trick with Matlab GUI
https://www.matrixlab-examples.com/card-trick.html72df4bb6a8e7715a03ff774c7df8a89dIn 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’...Tue, 19 Mar 2019 23:21:56 -0400WinSpice Simulator and Matlab
https://www.matrixlab-examples.com/winspice.html57bd1c5f5be695b00c2bacdf9b07c6fcWinSpice 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...Tue, 19 Mar 2019 23:21:41 -0400Fourier Analysis - introduction from a practical point of view
https://www.matrixlab-examples.com/fourier-analysis.html03b975ae4646abe0f0d1f6c809c48cb1Fourier analysis has many applications in science, physics, digital signal processing, imaging, numerical analysis, acoustics... Let's use math software to...Tue, 19 Mar 2019 23:03:40 -0400Line detection - working images with Matlab...
https://www.matrixlab-examples.com/line-detection.html08e955cc57d65c6eac9a2c8f382149e9This experiment explores line detection (image analysis) with Matlab...Tue, 19 Mar 2019 23:03:40 -0400Magic Square - properties in Matlab
https://www.matrixlab-examples.com/magic-square.html055a04993ebc0727d24a7e3266671b81Would you like to form a magic square with Matlab? Would you like to know why it is magic? Would you like to learn Matlab?...Fri, 15 Mar 2019 20:02:12 -04003D Plot Part 2 - working with Matlab
https://www.matrixlab-examples.com/3D-plot-part2.htmlc300616bec5e6be0e088eec111f1daf3The 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...Sun, 17 Feb 2019 23:23:39 -0500Polynomials in Matlab
https://www.matrixlab-examples.com/polynomials.htmlc820e03caf078453906362be1faa9463Polynomials 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...Wed, 13 Feb 2019 01:08:27 -0500Polynomial Regression in Matlab - easy least squares fitting
https://www.matrixlab-examples.com/polynomial-regression.htmlde480ebe3d8270ab837329297cc03b0fWe'll demonstrate how to work out polynomial regression in Matlab (also known as polynomial least squares fittings)...Wed, 13 Feb 2019 01:04:12 -0500Periodic Function - some codes without special toolboxes in Matlab
https://www.matrixlab-examples.com/periodic-function.html6141795452e8ddd0798370a26f77d9f8A periodic function repeats its values in regular periods or intervals. We explore codes for square and sawtooth waves without any special toolbox needed...Wed, 13 Feb 2019 01:03:45 -0500Calculating BMI - another GUI in Matlab
https://www.matrixlab-examples.com/calculating-bmi.html01dfaa49f6a89aa614792f4c66556ef7In 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...Wed, 13 Feb 2019 01:03:24 -0500Numerical Gradient - code in Matlab
https://www.matrixlab-examples.com/gradient.htmlf9ebedb29e14b779850b0e7a6d83dd38We 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...Sat, 9 Feb 2019 00:55:04 -0500Polygon Area - calculate with Matlab
https://www.matrixlab-examples.com/polygon-area.html8a708c2268d0f84312cbea034ea2d2d9This 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...Sat, 9 Feb 2019 00:37:31 -0500T statistic - Student's t-distribution Test in Matlab
https://www.matrixlab-examples.com/t-statistic.html97e18cd1e0c70e14b7354d6bfd21f306This 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...Sat, 9 Feb 2019 00:35:39 -0500Permutations and Combinations - calculate its number in Matlab
https://www.matrixlab-examples.com/permutations-and-combinations.htmlc61d51bad288e23421c9f3ae5b95c820This algorithm (code in Matlab) calculates the number of permutations and combinations of N objects taken D at a time. The full Matlab code is...Sat, 9 Feb 2019 00:33:47 -0500Scilab 3D Plot
https://www.matrixlab-examples.com/scilab-3d-plot.html7429cda55d89a54205380e08224ed642Create your first Scilab 3D Plot with these functions. See about plot3d, meshgrid and others...Sat, 9 Feb 2019 00:31:53 -0500Calculate Square Feet - online spreadsheet
https://www.matrixlab-examples.com/calculate-square-feet.html13c340815b3793ee7117e3fa75063d78How to calculate square feet - see this online converter for feet and inches...Fri, 8 Feb 2019 22:27:29 -0500Callback Function - GUIs in Matlab
https://www.matrixlab-examples.com/callback-function.html77b0c818a5a03fdef4cdd7de71a16204In 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.Fri, 8 Feb 2019 22:26:17 -0500Matlab Plot - using stems (vertical lines) for discrete
functions
https://www.matrixlab-examples.com/matlab-plot-3.htmlc381631ddfa6379a413df7601f575127In 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...Fri, 8 Feb 2019 21:53:59 -0500Smith Chart using Matlab
https://www.matrixlab-examples.com/smith-chart.htmlfcb0b66b7b05486e786cc0a55481e5cbThe Smith chart is a graphical tool designed for engineers specializing in RF to solve problems related to transmission lines and matching circuits....Fri, 8 Feb 2019 21:51:35 -0500Recursion - a conceptual example in Matlab
https://www.matrixlab-examples.com/recursion.htmlced318b1ae5e04eb3060958a521174eaRecursion is a kind of tricky and smart construction which allows a function to call itself. The Matlab programming language supports it...Fri, 8 Feb 2019 21:48:40 -0500Nodal Analysis - learn about KCL and solve it easily
with Matlab
https://www.matrixlab-examples.com/nodal-analysis.html6b4870f17cb79a3f43d7f20e076abb64How a nodal analysis can let you find voltages in an electrical circuit. Use this math software to work out the arithmetic operations...Fri, 8 Feb 2019 21:47:33 -0500Exponential Regression with Matlab
https://www.matrixlab-examples.com/exponential-regression.html1b082a181a3c25d9df4935157e8441aeWe’ll work with exponential regression in a curve fitting in Matlab. The following three methods find the coefficients of an equation for an exp. curve...Fri, 8 Feb 2019 21:46:15 -0500Curve Fitting in Scilab
https://www.matrixlab-examples.com/curve-fitting-scilab.html460a282cb4b6a37dbe6e4c31d71da750We show how curve fitting is done in Scilab. We show the polyfit and polyval functions equivalent to Matlab's...Fri, 8 Feb 2019 21:44:46 -0500Scilab Commands and Types
https://www.matrixlab-examples.com/scilab-commands.html9b3b38480ec7da9271eb62b81a07f7b4Basic Scilab commands and data types are introduced with basic examples, see these descriptions...Fri, 8 Feb 2019 19:31:11 -0500Half-life Calculator - Exponential Decay
https://www.matrixlab-examples.com/half-life-calculator.htmlabed847878e19e28165d2dfe612048e9This Half-life calculator is used to know the period of time it takes for a substance undergoing decay to decrease by half...Fri, 8 Feb 2019 19:28:08 -0500Horizontal Lines - plotting in Matlab
https://www.matrixlab-examples.com/horizontal-lines.html1617cd705931c60651b2ce8570f1afc8We show you how to draw horizontal lines (and vertical lines) in Matlab, and add them to any given plot...Fri, 8 Feb 2019 19:23:38 -0500Calculate Simple Interest and compound one... code in
Matlab
https://www.matrixlab-examples.com/calculate-simple-interest.html33df66f3d045654ccc3538e0bde1c6b7How to calculate simple interest and the compounded one with a numerical software in this article. We have to start with some definitions, though...Fri, 8 Feb 2019 19:13:15 -0500Curve fit for experimental data in Scilab
https://www.matrixlab-examples.com/curve-fit.html3e505b12c6e73ba088d46b827313289aIn this article we're curve fitting experimental data using the function datafit in Scilab...Fri, 8 Feb 2019 19:06:25 -0500Binary to decimal numbers - Four ways to convert them in
Matlab
https://www.matrixlab-examples.com/binary-to-decimal.html1aee026bbd7e9ac218c5004afc3f6278We present four variations of a binary to decimal conversion in Matlab; that is, we're going to convert binary numbers (numbers with only symbols '0' and '1') to decimal numbers (numbers with 10 different symbols, from '0' to '9')...Fri, 8 Feb 2019 19:02:37 -0500Matlab GUI - First steps...
https://www.matrixlab-examples.com/matlab-gui.htmlc3ac781e966c5edd42da75fe16e864dcWe are going to develop a simple Matlab GUI. We’ll use the Matlab GUIDE (Graphical User Interface Development Environment) which is pretty handy... This article is a super-fast introduction, but very convenient because with some ingenuity you can learn it in 10 minutes... or so...Fri, 8 Feb 2019 19:00:52 -0500Polar plots in Matlab - Functions: Compass, Polar and
Rose
https://www.matrixlab-examples.com/polar-plots.html3558e4ea4a9b521aed5c76de6a316704Polar plots use magnitudes and angles. In this article we’ll show the Matlab built-in commands 'compass', 'polar' and 'rose'...Fri, 8 Feb 2019 18:56:50 -0500Binary to hexadecimal numbers - algorithm in Matlab
https://www.matrixlab-examples.com/binary-to-hexadecimal.htmldb46112b6daa273a5692aa98f171c9e1To convert from binary to hexadecimal numbers, we first need to know what a hexadecimal number is. A major numbering method in digital systems is the hexadecimal system...Fri, 8 Feb 2019 18:55:21 -0500Scilab Examples
https://www.matrixlab-examples.com/scilab-examples.htmlf28cd75e5f2acd82de618f130e10617aThese Scilab examples give a practical approach to 2D drawings with this software...Fri, 8 Feb 2019 18:53:53 -0500Matrix Multiplication - step-by-step
https://www.matrixlab-examples.com/matrix-multiplication.htmlecc40061d49926e04b5112408a1ff5d1In this example, we show a code in Matlab that performs a matrix multiplication step-by-step. The algorithm displays all the elements being considered for the multiplication and shows how the resulting matrix is being formed in each step...Fri, 8 Feb 2019 18:52:36 -0500Piecewise Function - work them out with Matlab
https://www.matrixlab-examples.com/piecewise-function.html1e10ffb792d3f660284399a26ae1687eA piecewise function is a function whose definition changes depending on the value of the independent variable...Fri, 8 Feb 2019 18:51:07 -05003D Polygon - draw a box with Matlab
https://www.matrixlab-examples.com/3d-polygon.htmld964a8d6435bc08819da981ea354c93dDraw a 3D polygon with Matlab, specifically a 6-faces box using the built-in function fill3 ...Fri, 8 Feb 2019 18:49:50 -0500Matrix Inversion in Matlab - Gauss-Jordan method
https://www.matrixlab-examples.com/matrix-inversion.html8c8e23cb300919dcf59d7dc568af139aThis program performs the matrix inversion of a square matrix step-by-step. The inversion is performed by a modified Gauss-Jordan elimination method. We start with an arbitrary square matrix and a same-size identity matrix ...Tue, 5 Feb 2019 23:00:59 -0500Factorials - ways to code them without special functions
https://www.matrixlab-examples.com/factorials.html908b0896a3de100c406ed5f1af3aa062Factorials of positive integers are the product of all positive integers less than or equal to n. Operations are denoted by n!...Tue, 5 Feb 2019 22:58:38 -05003D graphs - plots, shapes and volumes in Matlab
https://www.matrixlab-examples.com/3d-graphs.htmlbf5d4d164a920257336ff040f1078db2Three-dimensional plots ( or 3D graphs ) can be created by Matlab. It provides lots of facilities for visualization of 3D information or data...Tue, 5 Feb 2019 22:30:05 -0500Armstrong Numbers - a code in Matlab
https://www.matrixlab-examples.com/armstrong-numbers.html96e03795a9a5c80d8c74f444ed7d1d08Armstrong numbers of three digits are integers such that the sum of the cubes of its digits equals the number itself. For example, 153 is an Armstrong number since 1^3 + 5^3 + 3^3 = 153...Tue, 5 Feb 2019 22:27:27 -0500Bisection Method in Matlab
https://www.matrixlab-examples.com/bisection-method.htmld8f91017260e578c7f940bb380c9808dA Bisection Method is proposed to find roots on continuous functions in a given interval...Tue, 5 Feb 2019 22:26:16 -0500Pascal's triangle - a code with for-loops in Matlab
https://www.matrixlab-examples.com/pascals-triangle.htmla53e7b4da35d1d04c1fd1dc79be480aeLet's calculate the elements of this Pascals triangle by coding simple Matlab iterations. The idea is to practice our for-loops and use our logic...Tue, 5 Feb 2019 20:08:44 -0500Quadratic Equations - solve them with this simple code
https://www.matrixlab-examples.com/quadratic-equations.html7e0a220db02bc63ec8fcfb09e84bd411We're creating now a Matlab program that calculates the quadratic roots (of quadratic equations ). The equation must be in the following form: ax2 + bx + c = 0, where a, b, and c are real coefficients...Tue, 5 Feb 2019 20:07:37 -0500Interpolation - easy code with Matlab
https://www.matrixlab-examples.com/interpolation.html72a571d6ba6e9cfda3cad1f59068d28fThis code calculates the y-coordinates of points on a line given their x-coordinates ( interpolation ). It is necessary to know coordinates of two points on the same line. The point is interpolated using the following formula...Tue, 5 Feb 2019 20:05:37 -0500Taylor Expansion - code series with Matlab
https://www.matrixlab-examples.com/taylor-expansion.html4fb587a253f98fd8fb88846da95e4930A Taylor expansion (series) is a more generic form of the Maclaurin series, and it can be centered at any x-value. In Matlab, we're....Tue, 5 Feb 2019 19:59:48 -0500ASCII Chart in Matlab
https://www.matrixlab-examples.com/ascii-chart.html11dcd1ef6b7d528b0ed7b414271154ccWe’re going to develop an ascii chart to understand instructions char and double in Matlab; second, we’ll work with a simple ascii conversion technique...and rot13 methodTue, 5 Feb 2019 19:56:39 -0500Impulse function - Dirac delta with Matlab
https://www.matrixlab-examples.com/impulse-function.html065ff77cc861eacd3bb2fca15426842aHow to plot the impulse function with Matlab. Some examples of Dirac delta or unit function...Tue, 5 Feb 2019 19:55:12 -0500Step function - unit step with Matlab
https://www.matrixlab-examples.com/step-function.htmld514b3f11b0c51c0b52ac0f85bbc70deHow to plot the unit step function - Heaviside - with Matlab. Let's see some examples of discrete operations...Tue, 5 Feb 2019 19:54:04 -0500