MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. Questions should be tagged with either [tag:matlab] or [tag:octave], but not both, unless the question explicitly involves both packages. When using this tag, please mention the MATLAB release you're working with (e.g. R2017a).
Consider the following simple speed test for arrayfun: T = 4000; N = 500; x = randn(T, N); Func1 = @(a) (3*a^
Let's say I have the cell array strs = {'HA' 'KU' 'LA' 'MA' &ap
You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function
I'm trying to plot several kernel density estimations on the same graph, and I want them to all be differ
Suppose that; I have an m-file at location:C:\M1\M2\M3\mfile.m And exe file of the matlab is at this locatio
Is it possible to get the 'nth' return value from a function without having to create dummy variable
Is it possible to have default arguments in MATLAB? For instance, here: function wave(a, b, n, k, T, f, flag,
I've noticed that a lot of good answers to MATLAB questions on Stack Overflow frequently use the functio
i and j are very popular variable names (see e.g., this question and this one). For example, in loops: for i=1
I'm experimenting with MATLAB OOP, as a start I mimicked my C++'s Logger classes and I'm puttin
Is there a foreach structure in MATLAB? If so, what happens if the underlying data changes (i.e. if objects a
Does MATLAB have a function/operator that indicates the type of a variable (similar to the typeof operator in
I am making some benchmarks with CUDA, C++, C#, Java, and using MATLAB for verification and matrix generation.
When I was studying for my undergraduate degree in EE, MATLAB required each function to be defined in its own
So talented people have figured out how to make xkcd style graphs in Mathematica, in LaTeX, in Python and in
For example, if I want to read the middle value from magic(5), I can do so like this: M = magic(5); value = M