Answered
Extract indices of two related arrays based on uniqueness and minimum WITHOUT FOR LOOP
A leaner version using a cell instead of a pre-allocation: A = randi([1,1000], 1, 1e6); B = randi([1,1000], 1, 1e6); ...

8 years ago | 0

| accepted

Answered
font control in uimenu objects
Pool = {'name : foo', ... 'address : foo', ... 'phone number : foo'}; figure; menuH...

8 years ago | 0

| accepted

Answered
sparse2 mexFunction not found
Did you read the README.txt file and followed the instructions? ============================================================...

8 years ago | 0

Answered
Is there something in MATLAB called de-sample? and how to do it?
This removes values, when the neighboring connections have the same slope: Time = 1:10; Signal = [0 1 1 1 2 3 3 4 5 5]...

8 years ago | 0

| accepted

Answered
fprintf leaving remainder of line
If you overwrite a text file by a shorter string than the original, the remaining characters are not cropped. To reduce the file...

8 years ago | 1

Answered
TickLabelInterpreter axis ticks bold
With the LaTeX interpreter you need to define the label as |'{\boldmath$\alpha$}'| to get a bold face font. See <https://www...

8 years ago | 0

| accepted

Answered
Out of memory error
* Install more RAM * Close other applications * Install more RAM * Increase the virtual memory * Use a 64 bit version of Mat...

8 years ago | 2

Answered
Replace repeated pair of coordinates generated from 'randi' statement.
This replies N different pairs of numbers between 1 and Len: N = 35; Len = 10; % Numbers from 1 to 10 K =...

8 years ago | 0

Answered
how to choose appropriate ode solver and set appropriate maxstep, RelTol etc. parameters
There is no "optimal" value for the tolerances and maximum step size. It depends on what you need. With higher tolerances, you g...

8 years ago | 1

Answered
Resize figure changes position and dimension of some objects
If you set the units of an UI-element to 'normalized', it's size changes, when the size of the parent object changes. To get a f...

8 years ago | 1

| accepted

Answered
Loop to solve ODE45 multiple times?
Currently you overwrite the results obtained in each iteration. Maybe you want: nResult = length(gen10m) * length(gen11m) *...

8 years ago | 1

Answered
please this line of code is giving me index exceeds matrix dimensions.....
Use the debugger: * <https://www.mathworks.com/help/matlab/debugging-code.html> * <https://www.mathworks.com/help/matlab/mat...

8 years ago | 0

Answered
Really easy one how to quickly repeat columns in an array
Summary: a = (1:1000).'; n = 1000; tic; for k = 1:1000 M = repmat(a, 1, n); end toc % 0.14 sec ...

8 years ago | 3

Answered
Error when converting to an exe file
Do you mean * <https://www.mathworks.com/help/signal/ref/hann.html |hann|> or * <https://www.mathworks.com/help/signal/ref/...

8 years ago | 0

| accepted

Answered
After this command, What is the element of matrix?
After |Mat = zeros()| this matrix contains zeros only. Setting |Mat(:,:,2)| to a linear combination of the elements of |Mat(:,:,...

8 years ago | 0

Answered
Really easy one how to quickly repeat columns in an array
a = 1:10; repelem(a.', 1, 10)

8 years ago | 1

Answered
How can I extract some variables inside ode45 solver?
It would not be useful to extract the values during the integration, because the function is evaluated several time for each ste...

8 years ago | 0

| accepted

Answered
how to resolve this error..Index exceeds matrix dimensions. Error in Untitled (line 27) testIMG = imread(['test\' a(1).name]);
The only indexing occurs in |a(1)| . If this exceed the limits already, |a| is empty. So check, how |a| is defined, e.g. using t...

8 years ago | 0

| accepted

Answered
plot not saveable, if it displays multiple functions
|plot| replies the handles of the line object, but |saveas| needs the handle of the figure: FigH = figure; % Before the co...

8 years ago | 0

| accepted

Answered
How to find the page of an array with it number/name and values, having max and min values as a whole page
X = rand(10, 8, 12); X(5, 6, 7) = 20; % The maximum [maxValue, maxIndex] = max(X(:)); [i1, i2, i3] = ind2s...

8 years ago | 0

| accepted

Answered
Dowload license for matlab r2010 a
* Open your account page: <https://www.mathworks.com/mwaccount/> * Select your license - the number is a link. Open it * Now t...

8 years ago | 0

Answered
Could someone please tell me what I'm doing wrong.
Although I do not understand, what the code should do, this looks strange: i = 1; flag = 0; for l = 1:length(x(:,1...

8 years ago | 0

Answered
How to do this
You apply a comparison to a matrix and use it as condition to an |if| command. But |if| requires a scalar condition. Therefore M...

8 years ago | 0

Answered
How can I save the RNG state for later reproducibility?
Of course you can find such details in the documentation: <https://www.mathworks.com/help/matlab/ref/rng.html doc rng> stat...

8 years ago | 2

| accepted

Answered
Forward, Backwawrd, Central, and Perfect Difference
A shorter form of your 1st order forward difference: function [out] = forwarddiff(x,y) x = x(:); % Consider row vecto...

8 years ago | 0

Answered
Can I buy matlab 2009a version on computer 64 bit?
You can buy a license the current version, but download and install and old version. To be perfectly sure, contact the official ...

8 years ago | 0

Answered
Send data to main gui after pushbutton
Provide the handle of the calling figure to the sub-GUI, e.g. by: function ClearMeasuresButton_Callback(hObject, eventdata,...

8 years ago | 0

| accepted

Answered
How to speedup mean and std calculation on GPU?
To calculate the standard deviation, the mean must be calculated again. Try to combine this: x2 = g_p(d-w+q-1:d+q-2,:);...

8 years ago | 0

| accepted

Answered
How to fix: Index Exceeds Matrix Dimensions
You cannot extract 20 column vectors, if the matrix has less than 20 columns. Maybe you want to extract _up to 20_ columns: ...

8 years ago | 0

Load more