Community Profile

# Jan

Last seen: Today Aktiv seit 2009

It is easier to solve a problem than to guess, what the problem is. Questions about FileExchange submissions are welcome - get my address from the code. I do not answer mails concerning questions in the forum.

#### Statistics

All

Abzeichen anzeigen

#### Content Feed

Anzeigen nach

Beantwortet
Speeding up matrix operations
Matlab calls optimized libraries to solve linear algebra operations. These libraries are based on BLAS and LAPACK, but modern ve...

etwa 5 Stunden vor | 1

Beantwortet
Power of a binary matrix
If you really define the matrix multiplication with mod(A*B, 2): A = randi([0,1], 11, 11); % Test data, use your "a" tic %...

etwa 9 Stunden vor | 1

Beantwortet
Power of a binary matrix
[EDITED] This is not the multiplication wanted by the OP - I leave it for educational reasons. Assuming, that you mean the us...

etwa 9 Stunden vor | 1

Beantwortet
How to get calculated variables from ode function?
The function to be integrated computes these values. You have all required inputs as output of ODE23S already. Use them as input...

3 Tage vor | 0

Beantwortet
How to write data horizontally in matlab using xlswrite to express meaning like excel
'A2:A4' specifies 3 elemente in a row.

3 Tage vor | 0

Beantwortet
Automatically load a struct from a struct with a variable name
file = 'test1.mat' [~, name] = fileparts(file); values = load(file); subStruct = values.(name); a = subStruct.a; ...

3 Tage vor | 0

Beantwortet
Problem understanding this "for" loop
Before the loop xx is pre-allocated to the maximum number of iterations. The for loop runs from 1 until MAXITER. The variable o...

3 Tage vor | 1

Beantwortet
How to to add column 3rd+4th, 6th+7th and 9th+10th from a 8x12 matrix?
C1 = B(:, 3) + B(:, 4); C2 = B(:, 6) + B(:, 7); C3 = B(:, 9) + B(:, 10); Or maybe: C = B(:, [3,6,9]) + B(:, [4,7,10])

3 Tage vor | 0

Beantwortet
How to filter out files with a list of specific string in UIGETFILE command?
As far as I can see, the file pattern [x] is not implemented in uigetfile: xlsfile = uigetfile('EF[AI]*.xls', 'Select Excel fil...

5 Tage vor | 0

Beantwortet
Hold on and Hold off command keeps all plots on subsequent graphs
clear clears the variuables of the workspace. clc clears the command window. Both do not have any connection to the state of the...

5 Tage vor | 0

Beantwortet
Compiled mex file raises memory issue
Avoid using int as dimensions. Call mxCreateNumericArray as explained in the documentation: mxArray *mxCreateNumericArray(mwSiz...

5 Tage vor | 0

Beantwortet
How to prevent triggering 'SizeChangedFcn' callback too many times?

5 Tage vor | 1

Beantwortet
Analyzing different sections of an array
Either reshape the array: x = rand(20, 100); y = reshape(x, 20, 10, 10); m = mean(x, 2); % If you want the mean value over b...

5 Tage vor | 0

| akzeptiert

Beantwortet
How to perform svd without using the inbuilt function?
You can find working solutions in the FileExchange: https://www.mathworks.com/matlabcentral/fileexchange/12674-simple-svd htt...

5 Tage vor | 0

Beantwortet
How do I take audio from Youtube and play it on Matlab?
As far as I know you cannot extract the sound directly in Matlab. Use an external tool like youtube-dl .

5 Tage vor | 0

Beantwortet
uninstalling old version error
If the installation is corrupted, the uninstallation can fail. Then install this version again overwriting the existing installa...

5 Tage vor | 0

| akzeptiert

Beantwortet
Subtracting a value in a 3D array with all values in another 3D array
A = rand(5,6,7); B = rand(6,7,8); D = min(A(:).' - B(:), [], 1); Result = reshape(D, size(A)); If the intermediate matrix A(...

6 Tage vor | 1

| akzeptiert

Beantwortet
How to determine how many random numbers were generated, using Mersenne twister?
The direct solution is to modify the function joeblow1 and joeblow1 such, that they count the created random numbers. Another o...

6 Tage vor | 0

Beantwortet
how i can fix the problem of isPrimitiveRoot ?
Open the documentation: doc isprimitiveroot or online: https://www.mathworks.com/help/symbolic/isprimitiveroot.html Scroll d...

7 Tage vor | 0

| akzeptiert

Beantwortet
How to extract data from this chunk of data
c = '77es-78es-79es-79es-80es-81es-82es-83es-144es-145es-146es-147es-1'; m = strfind(c, 'es'); d = c(m(1):m(end)-1); d = st...

7 Tage vor | 0

Beantwortet
Unrecognized function or variable 'lof'.
Do you have the Statistics and Machine Learning Toolbox installed and licensed? If not, you cannot access functions of this tool...

7 Tage vor | 0

Beantwortet
How to make a while loop to repeat multiple times with different values of variable?
Simply add a loop to modify q: for q = 0.5:4 t_in_before=19; t_out=-1; time = 0; while t_in_before > 5 ...

8 Tage vor | 0

| akzeptiert

Beantwortet
Unable to perform assignment because the size of the left side is 1-by-3 and the size of the right side is 7-by-3.
"Unable to perform assignment because the size of the left side is 1-by-3 and the size of the right side is 7-by-3." This error...

9 Tage vor | 0

Beantwortet
Can anyone identify the error? and correct it.
Avoid an overkill of parentheses: Ip=(I0)+((p*I01)+(p*(P-1)I02)/(2))+((P(p-1)(p-2)*I03)/(6))+((p(p-1)(p-2)(p-3)*I04)/(24)) % ...

9 Tage vor | 0

Beantwortet
Eliminate a for loop to increase speed
N = 2; L = 2; T = 1; a = [1 1i; -1i -1]; nplq = int8(de2bi((0:2^(N*L)-1),'left-msb')); % [0 0 0 0; 0 0 0 1; 0 0 1 0;...

9 Tage vor | 0

| akzeptiert

Frage

List of all functions an their toolboxes
Is there a way to get a list of the names of all toolbox functions? If I publish a toolbox, I want to avoid conflicts with Matl...

10 Tage vor | 1 Antwort | 0

### 1

Antwort

Beantwortet
GUI handle empty after using some scripts
Running a pile of scripts impedes the debugging massively, as you can see. Any of the scripts can be responsible for overwriting...

11 Tage vor | 0

| akzeptiert

Beantwortet
How to enable multi-core CPU processing during MATLAB code running?
It depends on the code. Many functions are multithreaded and use more cores for large inputs. This applies e.g. to sum(), filter...

11 Tage vor | 0

Beantwortet
Why this gives error?
This is the failing function: function [x,fval,gfx,output] = main(varargin) [x,fval,gfx,output] = hPSO1(@main3, 4, options, ...

11 Tage vor | 0

Beantwortet
Quaternions Computation Time too long
While the multiplication with the rotation matrix calls an optimzed BLAS library directly, rotatepoint is a function, which call...

11 Tage vor | 0