Community Profile

Top 1% contributor

The only difference between |if ... elsif| and |switch ... case| is one of clarity. It shouldn't make much difference in term of...

accepted

5

Answered 7 months ago

Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

Solve this!

10 months ago

The first form is not going to give you the result you expect, it is equivalent to: (0 <= t(i)) < pi Thus, it will compa...

4

Answered 5 months ago

Assuming you have a 16 bit integer, the simplest way to extract some bits from it is to use <http://www.mathworks.com/help/relea...

3

Answered 6 months ago

By default, a listener callback does not trigger its own event. You need to change its <http://www.mathworks.com/help/releases/R...

Of course, there is, use the two output version of <http://www.mathworks.com/help/releases/R2014b/matlab/ref/find.html |find|>: ...

Your array |l| has one more element than |z|. why? Anyway, z = 1:9; l = [1 2 -3 4 -5 6 7 -8 9]; negposition = find(l ...

Answered 8 months ago

<http://www.mathworks.com/help/releases/R2014b/matlab/ref/unique.html |unique|> will give the unique years, and its third return...

Do you really have a numeric value in one of the cell of your cell array? Anyway, <http://www.mathworks.com/help/releases/R20...

In term of performance |arrayfun| is probably slightly slower than a loop due to the overhead of the function call. So, don't ch...

Answered 9 months ago

You're already using |uint8| to store your values. There isn't a smaller type unless you start packing booleans into bits which ...

Answered 11 months ago

It sounds like you're trying to implement a numeric class. So I'll refer you to <http://www.mathworks.co.uk/help/matlab/matlab_o...

Answered 12 months ago

Perhaps, this is what you want to do: classdef Parent < handle properties (SetAccess = private) name = ''; c...

The error you're getting is nothing to do with reading generic text. It's telling you that the |fid| you're passing to |textscan...

2

Answered 28 days ago

Note that if you have the computer vision toolbox there are functions in there to directly draw shapes, including lines, into im...

Answered 1 month ago

As per Stalin's answer you can use <http://www.mathworks.com/help/matlab/ref/strncmp.html |strncmp|> and related with logical op...

The simplest way is to concatenate all your images in a higher dimension and simply use |all| in that higher dimension. If yo...

Answered 3 months ago

Matlab does not keep track of the unit. It's up to you to enter your value in the correct unit according to the calculation that...

Answered 4 months ago

As per Nobel's answer, you end you loop prematurely, the |end| should be in the last line. it still won't work though as you ...

Use <http://www.mathworks.com/help/releases/R2015a/matlab/ref/ismember.html |ismember|> with the |'rows'| option: A = [1 2 ...

I'm assuming that |LA_maxDF| is the 64x32x148 array, and that it is a stack of 2D images. The line that is not going to work ...

Hum, that is a bit tricky indeed. One possible way to solve it would be to |repmat| the second conditions across the pages of A:...

It's certainly possible to capture the data set number to reuse later in the expression. In fact, it's even the example that's s...

Possibly, you have a variable in your workspace called |msgbox|. What does which msgbox returns? Note that you may r...

This is a copy of the answer I wrote in the comment to my answer of <http://www.mathworks.com/matlabcentral/answers/183947 your ...

_I have to keep it in a cell format_ Why? If it's a cell array of scalar, a matrix is a lot more efficient. There are seve...

If understood correctly, you have several columns which are datetime and you want to regroup them in just one column. In that...

Your image is of type uint8 which is an <http://www.mathworks.com/help/releases/R2015a/matlab/matlab_prog/integers.html integer>...

<http://www.mathworks.com/help/releases/R2015a/matlab/ref/timeseries.plot.html |plot|> for timeseries is actually a different fu...

As Brendan has stated in his comment, matlab is exclusively pass by value. A function always receive a copy of the input argumen...

Load more