Answered
problems of this function
Use the debugger to find the problem. Type this in the command window: dbstop if error Then run the code again until it stops ...

8 years ago | 0

| accepted

Answered
How to call vector in matrix with condition
[m, loc] = ismember(A(:,1), B); R = A(m,4); [~, q] = sort(loc(m)); R = R(q)

8 years ago | 1

Answered
hello guys, i need help
A search in the forum will show some solutions (a concealed hint...): https://www.mathworks.com/matlabcentral/answers/25038-how...

8 years ago | 0

Answered
How to execute multiple m files in current project from command line in windows?
What about running this in the Windows command line: matlab -r "for k=1:21, run(sprintf('matlabfile%d.m', k)); end" Now the sc...

8 years ago | 1

| accepted

Answered
How to insert rows into a matrix
If the details with the size of the output are cleared, something like this will solve the problem: A = rand(748, 6); % Test d...

8 years ago | 1

| accepted

Answered
Grouping Data Into Smaller "Bins"
G = rand(5000, 3); % "data points" is not clear N = 100; siz = size(G); GG = reshape(G, [N, siz(1)/N, siz(2)]); R = ...

8 years ago | 0

| accepted

Answered
Matrix construction from base n indices
Do I understand correctly, that you want e.g. for N=2: f = [1,2; 3,4]; g = [10,20; 30,40]; h = [100,200; 300,400]; A = kro...

8 years ago | 1

| accepted

Answered
plot3 Not Animating with the Loop (Drawnow is already added)
mtm_x = rand(3,2,100); % mtm_x is imported and become a 3*2*100 double nt = size(mtm_x, 3); % do not rely on LENGTH s =...

8 years ago | 0

| accepted

Answered
Improve the Speed of my Code in filling an Array
What about inlinining the code of sub2ind: indices = rowO + (colO - 1) * size(mask, 1); mask(indices) = 1; It should be...

8 years ago | 0

Answered
2014 equivalent dir **\*.mat?
You find many many functions for a recursive search in the file exchange: Search for "recursive dir": https://www.mathworks.com...

8 years ago | 0

Answered
Why is my text going in the wrong subplot?
It is strange, that you use the dimensions of teh first axes ax1.YLim(2) to define the position of a text in the 2nd axes. So ma...

8 years ago | 0

| accepted

Answered
The program showing "Error using - Matrix dimensions must agree. out = im2double(a) - im2double(d);"
The error message is clear: a and d have different sizes. While d is a 2D matrix, a is most likely an RGB array with 3 dimension...

8 years ago | 0

Answered
How to get value of uicontrol object whose callback is executing?
The property 'Value' of a button is either 0 or 1 and you cannot use it to store data. But you can use the UserData, add an inpu...

8 years ago | 2

| accepted

Answered
Error on opening a .mat file.
"Unknown text on line number 1 of ASCII file Q:\BGFIAV\ZENT..." This sounds like it is a MAT file in ASCII format. Please confi...

8 years ago | 0

| accepted

Answered
Get max values from a table
As adam said already, import the data numerically, not as strings. The signal looks like a mix of two frequencies. Do you want ...

8 years ago | 0

Answered
Speeding up Sort Algorithm by removing ismember
LessTime = time(time <= PivotTime); LessSignal = time(time <= PivotTime); This redundant. I guess you mean: indexLess = ti...

8 years ago | 0

Answered
read multiple netcdf files
If ncread is not a Java method, increasing the heap memory of Java decreases the memory available for Matlab, so I assume this i...

8 years ago | 0

Answered
Writing a book at home license?
Of course the public forum cannot give you an advice, which is reliable enough for a legal question. Please ask MathWorks itself...

8 years ago | 0

Answered
How to allow user to toggle errorbars on a plot using a check box?
Create both plots at the same time and use the callback of the checkbox to togle the 'Visible' property: H.WithErrorBar = gob...

8 years ago | 0

| accepted

Answered
how to run a for loop to find a max min relationship?
The error message is clear: You try to concatenate vectors with not matching dimensions: k = 2; k0 = linspace(1, 1, 2000); K...

8 years ago | 0

Answered
Ignore or disable built in functions?
You can use the method with the full class name instead of relying on the import.

8 years ago | 1

Answered
how can i make the centre elements of a matrix to become zeros
The body of the loop does not use the indices ii and jj at all, so the code does not depend on k in any way. Call size at first...

8 years ago | 0

| accepted

Answered
what's the special symbol in a string
tmp(tmp < 32) = [] This remove all control characters, e.g. char(10), the line break.

8 years ago | 0

| accepted

Answered
Only thing that I want to control is speed. not pitch.
Start with searching in the net, especially in this forum: https://www.mathworks.com/matlabcentral/answers/106660-how-can-i-alt...

8 years ago | 0

| accepted

Answered
How to convert a double file to audiorecorder type ?
You can't. An audiorecorder and a double vectors are two different things. You cannot convert a list of temperatures to a thermo...

8 years ago | 1

| accepted

Answered
Improving speed of for-loop
nX = max(max(RX)); nY = max(max(RY)); EX = accumarray(RX(:), A(:), [], @sum); EY = accumarray(RY(:), B(:), [], @sum);...

8 years ago | 0

Answered
flip a matrix using loops
Your line is correct already. Only the loop is missing: n = size(matrix, 1); for k = 1:n outFlip(k,:) = inMatrix(n - k + 1,...

8 years ago | 1

Answered
Finding the pseudo inverse of a matrix
If the matrix A does not have full rank, there is no inverse. In consequence you cannot find any B, which satisfies A*B=eye . T...

8 years ago | 3

| accepted

Answered
disadvantages of ode15s, ode23s, ode23tb
This is discussed in https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html . Choosing the best integrator is a s...

8 years ago | 2

| accepted

Answered
how to arrange below code
With some guessing: ux = zeros(19, 7); ux(:, 1) = MM \ uu; % Do not use inv(), see: doc inv for k = 2:7 ux(:, k) = MM ...

8 years ago | 0

Load more