Answered
store results from recursion to use after
function [x, Out] = vcycle1d(n, x, b, T, w, levels, Out) x = damped_jacobiM(w, x, T, b, 1e-7, 3); res = b - T*x; ...

8 years ago | 0

| accepted

Answered
mex compile error undefined reference to `wrapper_dgemm_'
Try this: mex -O localwarp.cp libmwlapack.lib libmwblas.lib

8 years ago | 0

Answered
mex -setup warning
You forgot to ask a question. So maybe "yes" or "no" might be the best answer. The shown warning concerns changes in the future ...

8 years ago | 0

Answered
How can I load a mat file faster
You can load the file faster by using faster hardware: SSD, RAM and CPU matter. Maybe your RAM is exhausted and the computer use...

8 years ago | 0

Answered
An efficient function for k-th combination with no repetition?
What about https://www.mathworks.com/matlabcentral/fileexchange/23064-onecomb (link) V = [1 2 3 4 5]; K = 3; M = 6; comb =...

8 years ago | 2

| accepted

Answered
how to apply the arithmetic mean filter to a medical image to improve it? I have wrote this code but it did not work, there is an error which I could not figure it out.
for u=1:1:2;%sweeping through window for v=1:1:2; %taking arithmetic mean im(i,j)=im(i,j)+im(i+u,j+v); ...

8 years ago | 0

Answered
How can I make mean filter for color image?
See https://www.mathworks.com/matlabcentral/fileexchange/24812-blockmean: X = RGBimage; % 2D matrix, 3D RGB array or any other...

8 years ago | 0

Answered
Error: Invalid use of operator with nc files
I have no idea, what (:,ny:-1:1)z(n) should do. Something essential is missing here. Maybe you mean - a bold guess: zx(:,1:ny) ...

8 years ago | 0

| accepted

Answered
How to correctly vectorize?
The differences between the loop and the linear algebra implementation have the expected range. The matrix multiplication uses h...

8 years ago | 3

| accepted

Answered
Array dimensions of input '6' must match those of input '4', or be scalar
The command struct created a struct-array, if one of the inputs is a cell. Then all cells must have the same dimensions. If you ...

8 years ago | 1

| accepted

Answered
Running for loops in parallel
parfor k = 1:3 if k == 1 for n = 1:numel(variant1) [y1_v1,y2_v1]=calcscoreV1(x1_v1,x2_v1) end elseif k ==...

8 years ago | 0

| accepted

Answered
how to read multiple files using a function from the previous script
In Matlab there is an essential difference between "scripts" and "functions". It is important not to confuse the terms. "Functio...

8 years ago | 0

| accepted

Answered
Is there a source for vrrotvec algorithm: axis = cross-product, angle = acos(dot product)
This is the public Matlab forum. We cannot modify the contents of the Matlab files. Please contact MathWorks directly using the ...

8 years ago | 1

| accepted

Answered
Bellman equation with vector input
Replace: C = [B K-B]; for c=[1 1]:C ... by C = [B K-B]; for c1 = 1:B for c2 = 1:K-B c = [c1, c2] ...

8 years ago | 0

Answered
3D Matrix Multiply
B = A .* reshape(V, [1, 1, numel(V)]) This works with auto-expanding since R2016b.

8 years ago | 2

| accepted

Answered
Identifying very subtle colour change
Yes. Of course there is a method to distinguish colors. You can do this with distances to the RGB values or smarter in Lab or H...

8 years ago | 0

Answered
Multiplication of sound and sinusoidal signal
I guess, you want this: [a, Fs] = audioread('music.wav'); len = size(a, 1); t = (0:len - 1) / FS; % time in second...

8 years ago | 1

Answered
delete subfolder with specific name*
Add some error messages: base = cd; d = dir(fullfile(base, 'output_figure_*')); dirlist = d([d.isdir]); dirlist = d...

8 years ago | 2

| accepted

Answered
Download and unzip a zip data
You can do this in the file exporer manually. Windows' Explorer handles zip files directly already, but 7zip is an option also. ...

8 years ago | 0

Answered
Copy file from one directory to another
If there are really problems with the copy of a file pattern, do it explicitly with a loop: psource = 'filepath' pdest = 'my...

8 years ago | 3

Answered
Display trailing edge of a long strings of a listbox by hovering the mouse over the string
See https://undocumentedmatlab.com/blog/setting-listbox-mouse-actions % Prepare the Matlab listbox uicontrol hFig = figure; l...

8 years ago | 0

| accepted

Answered
Reading a .dat file without a for loop
Is the number of rows stored in the header? If not, isn't it easy to determine it by a simple calculation based on the file size...

8 years ago | 1

Answered
Piecewise integration - implied volatility
length(SortedDax) is a frequent source of bugs: You measure the longest dimenion, not a specific one. If SortedDax is a [3 x 30]...

8 years ago | 0

Answered
How to find error of Fourth Order Runge-Kutta method?
To get the error in terms of h^4 calculate the trajectory with different h and determine the differences in the results. You can...

8 years ago | 0

Answered
no gui result different from gui
There is no magic flag for changing the results if Matlab is called without GUI. Therefore you can be sure that you instruct Mat...

8 years ago | 0

Answered
1-d gradient
Your question contains the answer already. If the data is a vector, conv is sufficient instead of conv2: x = rand(1, 10) dx...

8 years ago | 1

| accepted

Answered
Merge row and column headers into column header or Get Index Names
col = {'monkey', 'rabbit', 'tiger', 'snail'}; row = {'monkey', 'rabbit', 'tiger', 'snail'}; % can differ from col Result = ce...

8 years ago | 0

| accepted

Answered
Question on using addedge()
Do you mean: G = addedge(G,5,6) G.Edges.Value1 = ones(5,1) Or T = table(1, 0, 'VariableNames', {'Value1', 'Value2'}); G = a...

8 years ago | 1

| accepted

Answered
How to add GUI for existing code
figure; axes('NextPlot', 'add'); % same as "hold on" grid on % Once only! plot(l_b,vd_b,'-ko') % Once...

8 years ago | 0

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

Load more