Top "Matlab" questions

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks.

MATLAB subplot title and axes labels

I have the following script to ultimately plot a 4 by 2 subplot: files = getAllFiles('preliminaries'); n = size(files); cases = cell(1, n); …

matlab label plot figure
"Undefined function 'function_name' for input arguments of type 'double'."

A question that pops up quite frequently in different shapes and sizes is: Why do I get the following error …

matlab undefined octave
How can I extract data from a .fig file in MATLAB?

I know this is really basic, but I am new to MATLAB. After opening a .fig file, how do you …

matlab file plot figure
MATLAB-style find() function in Python

In MATLAB it is easy to find the indices of values that meet a particular condition: >> a = [1,2,3,1,2,3,1,2,3]; >&…

python matlab find
How can I efficiently remove zeroes from a (non-sparse) matrix?

I have a matrix: x = [0 0 0 1 1 0 5 0 7 0]; I need to remove all of the zeroes, like so: x = [1 1 5 7]; The matrices I am …

arrays matlab performance matrix matrix-indexing
How to convert the integer date format into YYYYMMDD?

Python and Matlab quite often have integer date representations as follows: 733828.0 733829.0 733832.0 733833.0 733834.0 733835.0 733836.0 733839.0 733840.0 733841.0 these numbers correspond to some dates this year. Do …

python matlab datetime-format
How can I sort a 2-D array in MATLAB with respect to one column?

I would like to sort a matrix according to a particular column. There is a sort function, but it sorts …

matlab sorting matrix octave
Matrix from Python to MATLAB

I'm working with Python and MATLAB right now and I have a 2D array in Python that I need to …

python matlab file-io import matrix
How to convert a grayscale matrix to an RGB matrix in MATLAB?

rgbImage = grayImage / max(max(grayImage)); or rgbImage = grayImage / 255; Which of the above is right,and reason?

image matlab matrix rgb grayscale
Plotting data on time (date) axis

I have data like this: 22.10.1980. 100 25.10.1980. 120 26.10.1980. 12 (only much more of it, and for each date, several independent measurements on the right). …

matlab date matlab-figure