Practical solutions

Matlab Howtos How-To Guides

Solve the problem. Keep building. Collection of Matlab how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Get the Size of Vector in MatlabIn this article, we will explore various methods to achieve this goal using the size(), length(), and numel() functions. How to Read XLSX in MATLABChoose readtable(), readmatrix(), or readcell() to import XLSX data into MATLAB. How to MATLAB Sort RowsOne can sort rows present in a matrix and a table using the sortrows() function in MATLAB. How to Export Data From MATLAB to ExcelExport MATLAB matrices, cell arrays, and tables to Excel with writematrix(), writecell(), and writetable(). How to Get Roots of Polynomial in MatlabOne can find the roots of a polynomial using the roots() and solve() functions in MATLAB. How to Create Random Matrix in MATLABGenerate random matrices and arrays in MATLAB with rand(), randi(), randn(), randperm(), betarnd(), and random(). The find() Function in MATLABThis tutorial will discuss how we can use the find() function to find values and indices of non-zero elements in a vector or matrix in MATLAB. How to Plot Line Styles in MATLABDistinguish MATLAB plot lines with styles, markers, colors, widths, and clear legend labels. The nnz() Function in MATLABLearn what MATLAB nnz counts and use it with vectors, matrices, selected regions, sparse data, and logical conditions. MATLAB Inverse Fast Fourier TransformUse MATLAB's ifft() function to reconstruct a signal from its Fourier transform. How to Return Multiple Values From a MATLAB FunctionLearn to define MATLAB functions with multiple outputs, select the results a caller needs, and group related values in a structure or cell array. MATLAB Fprintf TableLearn how to use MATLAB's fprintf function to print formatted text and create tables. This guide covers essential techniques for displaying data clearly, including formatting numbers, aligning text, and writing output to files. Perfect for beginners and experienced users alike, discover the power of fprintf to enhance your MATLAB programming skills. How to Find Reduced Row Echelon Form MATLABLearn how to find the reduced row echelon form of a matrix in MATLAB using rref. See how to interpret the result, retrieve pivot columns, and set a tolerance. MATLAB sscanf() FunctionOne can scan a string according to a given format using the sscanf() function in MATLAB. MATLAB White NoiseDiscover how to generate white noise in MATLAB using the awgn() and wgn() functions. This article provides clear examples and explanations, helping you understand white noise's significance in signal processing and communications. Learn to add noise to signals and create standalone noise signals for your projects. How to Concatenate String in MATLABLearn how to combine MATLAB text with strcat(), concatenate compatible arrays, add separators, and choose between strcat() and + for string arrays or character vectors. How to Get Random Permutation Using MATLABLearn how MATLAB's randperm function creates full permutations and unique random samples, and how to reproduce a permutation by saving and restoring the random generator state. How to Escape Character Sequences on a String in MATLABThis tutorial demonstrates how to escape character sequences in strings in MATLAB. Learn the methods to use escape characters effectively, including examples for including quotes, new lines, and backslashes. Enhance your MATLAB programming skills with these string manipulation techniques. MATLAB Norm() FunctionLearn how MATLAB norm() computes vector and matrix norms, how to choose a norm, and how vecnorm() handles rows or columns. MATLAB Repelem() FunctionUse MATLAB repelem to repeat scalar and array elements with uniform or per-element counts. How to Read CSV File in MatlabChoose readtable(), readmatrix(), or readcell() to import CSV data in MATLAB. How to Create an Empty Matrix in MATLABThis tutorial demonstrates the method to create an empty matrix using different methods in MATLAB. How to Comment Multiple Lines in MATLABLearn how to comment multiple lines in MATLAB: wrap a block in the %{ and %} block comment operators, or select lines in the MATLAB editor and comment or uncomment them with a shortcut. The meshgrid() Function in MATLABLearn how meshgrid() in MATLAB maps coordinate vectors into matrices, evaluate a function across a 2-D grid, and visualize the result with surf().