Matlab examples - the blog...
http://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-usmatlabWed, 20 Mar 2019 00:03:23 -0400Wed, 20 Mar 2019 00:03:23 -0400matrixlab-examples.comCreate Matlab GUI - video
http://www.matrixlab-examples.com/matlab-gui-3.html33ca1e668c518228f284e8842f2f680aVideo 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
http://www.matrixlab-examples.com/power-factor-correction-capacitors.htmle047dd200a66596c6f165d5aa0175292Example 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
http://www.matrixlab-examples.com/card-trick.html78e469b6128c387e0cb496f6d29ed20eIn 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
http://www.matrixlab-examples.com/winspice.htmlf6f00f93d2942757a5c233cb8c9e035fWinSpice 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
http://www.matrixlab-examples.com/fourier-analysis.html49bf1d9c3ba7259daa179ce667e9a9aeFourier 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...
http://www.matrixlab-examples.com/line-detection.html74c78baa423f82fb3ef2a7e6ec3188edThis experiment explores line detection (image analysis) with Matlab...Tue, 19 Mar 2019 23:03:40 -0400Magic Square - properties in Matlab
http://www.matrixlab-examples.com/magic-square.html2cc71d4663ef1b2b2cf86a60d1ff4339Would 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
http://www.matrixlab-examples.com/3D-plot-part2.htmlfbe0c53ea2a22ccf6230b351bb387269The 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
http://www.matrixlab-examples.com/polynomials.html66739fb35bc71d08e84d3c4d9e623a05Polynomials 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
http://www.matrixlab-examples.com/polynomial-regression.html16572035a392fdbd9cd5cb1e12cf8f28We'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
http://www.matrixlab-examples.com/periodic-function.html5cc715a61de825685f19bb7b604f27b8A 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
http://www.matrixlab-examples.com/calculating-bmi.htmlab8ac60a3970f810f65acf6ce825836dIn 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
http://www.matrixlab-examples.com/gradient.html76334e9c87a935b47ac1f76c74cdbdceWe 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
http://www.matrixlab-examples.com/polygon-area.html269c1ae37c5b6d433d5f4fbb45576210This 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
http://www.matrixlab-examples.com/t-statistic.html4a6691e85edcb239c4577dafcea4eb6bThis 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
http://www.matrixlab-examples.com/permutations-and-combinations.htmla4f5560735446f787bd2ffa6c94afb6cThis 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
http://www.matrixlab-examples.com/scilab-3d-plot.htmldb3bd8a111f315d2c6b0de12f59f4ef3Create 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
http://www.matrixlab-examples.com/calculate-square-feet.html5ec066a98d807b0fd364b076eee3c808How to calculate square feet - see this online converter for feet and inches...Fri, 8 Feb 2019 22:27:29 -0500Callback Function - GUIs in Matlab
http://www.matrixlab-examples.com/callback-function.html9ab22d752d2268e22efc8c488ecb5d78In 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
http://www.matrixlab-examples.com/matlab-plot-3.htmlba97bd589ecb1474711b1cc85325ecf9In 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
http://www.matrixlab-examples.com/smith-chart.html639f3745511b4549ddd37d5c4f3d18f9The 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
http://www.matrixlab-examples.com/recursion.html43f3161b9601d07a38c299550afceb9aRecursion 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
http://www.matrixlab-examples.com/nodal-analysis.htmlf01dca9245a8fdb27c076411dfc4dbc7How 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
http://www.matrixlab-examples.com/exponential-regression.html91b369fe8960bbfff3a5deeb4554560fWe’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
http://www.matrixlab-examples.com/curve-fitting-scilab.htmlb58f74daccc6acce7508da834dc75693We 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
http://www.matrixlab-examples.com/scilab-commands.html149f0d056aecfa8ab5bae64dd9af1fd9Basic 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
http://www.matrixlab-examples.com/half-life-calculator.html94649375d00cbba3608e91639b2e8bf8This 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
http://www.matrixlab-examples.com/horizontal-lines.html15afb30eedc393baf7a3b09e16349df3We 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
http://www.matrixlab-examples.com/calculate-simple-interest.html5d6bf9f2e342a1cc47de8cc2c55259dfHow 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
http://www.matrixlab-examples.com/curve-fit.html948b641f168a6ac5a9ba954737c761b6In 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
http://www.matrixlab-examples.com/binary-to-decimal.htmlffed8d4fc02fd1018ea0b691093d8031We 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...
http://www.matrixlab-examples.com/matlab-gui.htmldf2760bde7ed23766f71222e4949a58dWe 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
http://www.matrixlab-examples.com/polar-plots.html73da79713c331eb35f0c5e88c81b432fPolar 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
http://www.matrixlab-examples.com/binary-to-hexadecimal.htmld7d2f141483aebe99a954077c66a4aa2To 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
http://www.matrixlab-examples.com/scilab-examples.htmlfea87b846c5bde7d1b80787e1443055eThese Scilab examples give a practical approach to 2D drawings with this software...Fri, 8 Feb 2019 18:53:53 -0500Matrix Multiplication - step-by-step
http://www.matrixlab-examples.com/matrix-multiplication.html2041ebbb840b7307335454f3427fb642In 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
http://www.matrixlab-examples.com/piecewise-function.html6b4fa56b3abce1ae1979ed96c34eefe2A 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
http://www.matrixlab-examples.com/3d-polygon.html8010b6a0ccec97b10d61e3c2e8d2c628Draw 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
http://www.matrixlab-examples.com/matrix-inversion.htmlceb17b9ea51ed17b6b4e77fe177e783eThis 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
http://www.matrixlab-examples.com/factorials.html1059e4827e1d5ff593a749337938480cFactorials 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
http://www.matrixlab-examples.com/3d-graphs.html07be6bd133f0317663f2da675102bd39Three-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
http://www.matrixlab-examples.com/armstrong-numbers.htmla36849e0f8882f0912efef51dfcb2cacArmstrong 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
http://www.matrixlab-examples.com/bisection-method.htmlc35d1d4b996a9497769f26cd2a888466A 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
http://www.matrixlab-examples.com/pascals-triangle.html319413ed6c852e246bb2324111b5e3e7Let'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
http://www.matrixlab-examples.com/quadratic-equations.htmle5a75134756e5f00bba66b4bc7563b63We'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
http://www.matrixlab-examples.com/interpolation.htmlba689fccbff4fa0001534d2fb8f0c5a6This 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
http://www.matrixlab-examples.com/taylor-expansion.html36d0c03a03aaac281e45b44033ecc859A 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
http://www.matrixlab-examples.com/ascii-chart.html8d329aa4e22b3533f547ef01bbf3b697We’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
http://www.matrixlab-examples.com/impulse-function.html7698968e9dde3362df6402887bfbaae5How 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
http://www.matrixlab-examples.com/step-function.html33b76238dc9b6a316b2fe885e3e61d9bHow to plot the unit step function - Heaviside - with Matlab. Let's see some examples of discrete operations...Tue, 5 Feb 2019 19:54:04 -0500Excel Programming - interchanging information with Matlab - Video
http://www.matrixlab-examples.com/excel-programming.html233aedb03d6b5eeaba22d312f4a8d6c3Do Excel programming, (video) interchange of information between Matlab and MS-Excel...Thu, 31 Jan 2019 19:42:10 -0500Cell Arrays - video tip on Matlab
http://www.matrixlab-examples.com/cell-arrays-video.htmle343b9d09fb92ad26e1e3a5dea9fa036Cell arrays are very powerful array type available in Matlab. Informally speaking, a CA is a heterogenous array type, meaning that different elements in the array can contain variables of different types...Thu, 31 Jan 2019 19:40:57 -0500Interactive plots - Matlab graphics without an m-file
http://www.matrixlab-examples.com/interactive-plots.html1e67fd3982b159ec5afc9da102120fddInteractively create plots using the available Matlab graphics tools. Don't need an m-file...Thu, 31 Jan 2019 19:38:47 -0500Curve Fitting made easy with Matlab
http://www.matrixlab-examples.com/curve-fitting.html2240efdbda55c2f03654a8be47a677d5Video: use the curve fitting tool that can be found within the figure windows in Matlab...Thu, 31 Jan 2019 19:37:36 -0500Video: create a Matlab program
http://www.matrixlab-examples.com/matlab-program.html8ce3636f99eab13e17be92afadf54236See this video to learn to create a Matlab program. Use the editor window...Thu, 31 Jan 2019 19:36:16 -0500x-axis - Video: changing tick labels on Matlab graphics
http://www.matrixlab-examples.com/x-axis.html38c0a0536b22f05f0e3be7fe0199e4f9Modify the x-axis label on graphics or plots in Matlab: video demonstration...Thu, 31 Jan 2019 19:34:26 -0500