Top "Matlab" questions

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

Is it possible to define more than one function per file in MATLAB, and access them from outside that file?

When I was studying for my undergraduate degree in EE, MATLAB required each function to be defined in its own …

matlab function file scope function-declaration
Optional args in MATLAB functions

How can I declare function in MATLAB with optional arguments? For example: function [a] = train(x, y, opt), where opt …

function math matlab parameters arguments
Function for 'does matrix contain value X?'

Is there a built in MATLAB function to find out if a matrix contains a certain value? (ala PHP's in_…

matlab function matrix floating-point
How to show x and y axes in a MATLAB graph?

I am drawing a graph using the plot() function, but by default it doesn't show the axes. How do we …

matlab graph draw axes
how to open .mat file without using MATLAB?

I have done a project in Matlab and now I have uninstalled Matlab. Now, I need some reference of my …

matlab notepad
Loop through files in a folder in matlab

I have a set of days of log files that I need to parse and look at in matlab. The …

matlab loops file-io csv
How can I apply a function to every row/column of a matrix in MATLAB?

You can apply a function to every item in a vector by saying, for example, v + 1, or you can use …

matlab function matrix vectorization
MATLAB - multiple return values from a function?

I'm writing 2 functions in matlab, an initialize function and a function to insert items into an array treating it like …

matlab return-value
Iterating through struct fieldnames in MATLAB

My question is easily summarized as: "Why does the following not work?" teststruct = struct('a',3,'b',5,'c',9) fields = fieldnames(teststruct) …

matlab matlab-struct
How do I detect empty cells in a cell array?

How do I detect empty cells in a cell array? I know the command to remove the empty cell is …

matlab cell-array is-empty