Answered

Making Dynamic array

What do you need it for? There's no such thing as a dynamic array but you can grow an array with concatenation which is usual...

Making Dynamic array

What do you need it for? There's no such thing as a dynamic array but you can grow an array with concatenation which is usual...

4 years ago | 0

| accepted

Answered

How do I convert an RGB image to CIEXYZ colorspace?

If you have the Imgae processing Toolbox

How do I convert an RGB image to CIEXYZ colorspace?

If you have the Imgae processing Toolbox

4 years ago | 1

| accepted

Answered

HOW TO CONVERT PASSWORD TO ******** FORMAT USING MATLAB

An addition to the list <http://uk.mathworks.com/matlabcentral/fileexchange/47210-passfield FEX: passfield>. <<http://uk....

HOW TO CONVERT PASSWORD TO ******** FORMAT USING MATLAB

An addition to the list <http://uk.mathworks.com/matlabcentral/fileexchange/47210-passfield FEX: passfield>. <<http://uk....

4 years ago | 0

Answered

asking for a password or code.

An addition to the list by Jan <http://uk.mathworks.com/matlabcentral/fileexchange/47210-passfield FEX: passfield>. <<htt...

asking for a password or code.

An addition to the list by Jan <http://uk.mathworks.com/matlabcentral/fileexchange/47210-passfield FEX: passfield>. <<htt...

4 years ago | 0

Question

Clear text typed with input() from the command history

The case scenario is very simple, I am asking for a password to be typed in the command window. I am using s = input(...

4 years ago | 2 answers | 0

Question

why regexprep much slower than strrep

Consider the following simplified example: str = cellstr(repmat('987_890',1e5,1)); timeit(@()strrep(str,'_','')) time...

4 years ago | 0 answers | 1

Answered

[Bug?] Print to eps on Win produces Unix line endings

Since R2014b, on Win: it is not a bug but a change in behavior of the |print()| function. A workaround is to read in the .ep...

[Bug?] Print to eps on Win produces Unix line endings

Since R2014b, on Win: it is not a bug but a change in behavior of the |print()| function. A workaround is to read in the .ep...

4 years ago | 0

| accepted

Question

[Bug?] Print to eps on Win produces Unix line endings

On Win7 64b with R2014b, printing a figure to .eps produces Unix line endings (LF or \n). Is this expected or a *bug*? Als...

4 years ago | 1 answer | 0

Answered

Faster way to create Rectangles

To use patches you need first to organize the |Xdata| and |Ydata| in matrices of 4 rows, one per vertex, and as many columns as ...

Faster way to create Rectangles

To use patches you need first to organize the |Xdata| and |Ydata| in matrices of 4 rows, one per vertex, and as many columns as ...

4 years ago | 1

| accepted

Answered

How to stop parfor from launching a parallel pool automatically?

In the preferences: <</matlabcentral/answers/uploaded_files/19338/Capture.PNG>> . To edit parallel preferences programm...

How to stop parfor from launching a parallel pool automatically?

In the preferences: <</matlabcentral/answers/uploaded_files/19338/Capture.PNG>> . To edit parallel preferences programm...

4 years ago | 6

| accepted

Answered

fprintf \n not working properly

You are printing a 5 column row: '%12.8f %12.8f %12.8f %12.8f %12.8f \n' but supplying 6 datatpoints: Data(row_...

fprintf \n not working properly

You are printing a 5 column row: '%12.8f %12.8f %12.8f %12.8f %12.8f \n' but supplying 6 datatpoints: Data(row_...

4 years ago | 1

| accepted

Answered

Save vector to m-file

Since R2014a you can use <http://www.mathworks.co.uk/help/matlab/ref/matlab.io.savevariablestoscript.html |matlab.io.saveVariabl...

Save vector to m-file

Since R2014a you can use <http://www.mathworks.co.uk/help/matlab/ref/matlab.io.savevariablestoscript.html |matlab.io.saveVariabl...

4 years ago | 1

Answered

Text out goes weird on Figure with underscores

By default the interpreter of text objects is set to |'tex'|. Set it to 'none', i.e. set(obj,'Interpreter','none') For...

Text out goes weird on Figure with underscores

By default the interpreter of text objects is set to |'tex'|. Set it to 'none', i.e. set(obj,'Interpreter','none') For...

4 years ago | 0

| accepted

Answered

Matlab creating help but ignoring the header

The help should be a continuous block of comments. This means that the |classdef| or |function| declarations constitute a termin...

Matlab creating help but ignoring the header

The help should be a continuous block of comments. This means that the |classdef| or |function| declarations constitute a termin...

4 years ago | 0

Solved

Circle area using pi

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

5 years ago

Answered

Unexpected numerical errors in matrix/vector multiplication

The dot product implementation might differ according to the input, i.e. dot product between two vectors as opposed between two ...

Unexpected numerical errors in matrix/vector multiplication

The dot product implementation might differ according to the input, i.e. dot product between two vectors as opposed between two ...

5 years ago | 2

| accepted

Answered

Rapid Vector Matching/Search Problem

You can try to use <http://www.mathworks.co.uk/help/matlab/ref/bsxfun.html |bsxfun()|>: find(all(bsxfun(@eq, A,B),2)) Wh...

Rapid Vector Matching/Search Problem

You can try to use <http://www.mathworks.co.uk/help/matlab/ref/bsxfun.html |bsxfun()|>: find(all(bsxfun(@eq, A,B),2)) Wh...

5 years ago | 2

Answered

sum of two different data series

You cannot use |DataIdx| directly as |subs| in |accumarray()| because in your example each streak of indices is treated as a sep...

sum of two different data series

You cannot use |DataIdx| directly as |subs| in |accumarray()| because in your example each streak of indices is treated as a sep...

5 years ago | 2

Question

Subclassing abstract property with defined class, e.g myprop@char, throws an error

Suppose I have a superclass that I want to use to create an interface: classdef foo properties(Abstract) ...

5 years ago | 1 answer | 1

Answered

Autocomplete of properties for hgsetget derived class

I've been fiddling around and by mistake I found that the <http://www.mathworks.co.uk/help/simulink/slref/matlab.system.stringse...

Autocomplete of properties for hgsetget derived class

I've been fiddling around and by mistake I found that the <http://www.mathworks.co.uk/help/simulink/slref/matlab.system.stringse...

5 years ago | 3

| accepted

Answered

How to Load a class from file avoiding the set methods with empty arguments?

From <http://www.mathworks.co.uk/help/matlab/matlab_oop/tips-for-saving-and-loading.html#brzypwx tips from saving and loading>: ...

How to Load a class from file avoiding the set methods with empty arguments?

From <http://www.mathworks.co.uk/help/matlab/matlab_oop/tips-for-saving-and-loading.html#brzypwx tips from saving and loading>: ...

5 years ago | 4

| accepted

Question

Autocomplete of properties for hgsetget derived class

*DESIRED BEHAVIOUR* If you create: h = uicontrol('style','edit'); Then if you type h.<tab> and then sel...

5 years ago | 1 answer | 0

Question

Compress only selected variables when saving to .mat

I have two variables |data| and |meta|, which I am saving in a compressed .mat file (version |'-v7'| ). The |data| variable is u...

5 years ago | 1 answer | 2

Answered

Clear text typed with input() from the command history

After digging into the Java internals with the help of <http://www.mathworks.co.uk/matlabcentral/fileexchange/authors/27420 Yair...

Clear text typed with input() from the command history

After digging into the Java internals with the help of <http://www.mathworks.co.uk/matlabcentral/fileexchange/authors/27420 Yair...

5 years ago | 2

| accepted

Solved

Balanced number

Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

5 years ago

Answered

histc with split intervals

You could use |bsxfun()|. A simple example might clarify. Suppose you have sample inputs: A = [3, 5 10, 20 ...

histc with split intervals

You could use |bsxfun()|. A simple example might clarify. Suppose you have sample inputs: A = [3, 5 10, 20 ...

5 years ago | 0

Submitted

FINDSEQ

Find sequences of repeated (adjacent/consecutive) numeric values. NaNs and Infs are supported.

5 years ago | 8 downloads |

Answered

Latex Support to publish in html format

Two workarounds: 1) Use |\int\int| with negative spaces in between |\!\!| text(.5,.5,'$\int\!\!\int_{E} f\left(x,y\right...

Latex Support to publish in html format

Two workarounds: 1) Use |\int\int| with negative spaces in between |\!\!| text(.5,.5,'$\int\!\!\int_{E} f\left(x,y\right...

5 years ago | 1

| accepted

Question

R2013b IDE nonsense. The story continues.

This is *NOT* a question but a point that I would like to raise. I _suggest_ to comment my post and/or add additional and justif...

5 years ago | 2 answers | 7

Answered

Programmatically scroll to row number in the variable editor

The full answer with links to a not-so-trivial problem can be found in a guest post on http://undocumentedmatlab.com/blog/variab...

Programmatically scroll to row number in the variable editor

The full answer with links to a not-so-trivial problem can be found in a guest post on http://undocumentedmatlab.com/blog/variab...

6 years ago | 0

| accepted