Community Profile

photo

Jan


Last seen: Today Con actividad desde 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
  • Most Accepted 2022
  • Most Accepted 2021
  • Promoter
  • Commenter
  • Explorer
  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Grand Master
  • Revival Level 4

Ver insignias

Content Feed

Respondida
Get special variable out of every struct in workspace
This is a bad coding design. Creating a bunch of variables causes much troubles. See here for an exhaustive discussion: https://...

alrededor de 16 horas hace | 1

Respondida
How to write this fuction in Matlab? I have an example code in Python
Assuming that b_1, b_2, r_1, r_2 are constants: % As anonymous function: r_1 = rand; % Define the constants r_2 = rand; b_1...

1 día hace | 1

| aceptada

Respondida
Why does my uicontextmenu only show after a pause/breakpoint?
Try to replace pause by drawnow. This allows the GUI to activate the updated properties. If this is working also, this is the ex...

3 días hace | 0

| aceptada

Respondida
Why do i get error when i reupload the GUI that i deleted before.
The solution is explained in the message clearly already: "Contact the File exchage If you want to upload the file again". Searc...

5 días hace | 0

| aceptada

Respondida
how to add header for new output file?
You want to copy the header? Read the first 15 lines and write it: [fid, msg] = fopen(file_paths{i}, 'r'); assert(fid > 0, msg...

5 días hace | 0

| aceptada

Respondida
i want the loop to run only one time, it keeps running until it subtract 84 instead of 6
Remember that length(A) replies the longest dimension. Maybe you meant height(A). Even if this replies the same value for the ex...

7 días hace | 0

Respondida
Unexpected high memory usage in MATLAB.
Avoid clear all, because it has no benefits. It removes all loaded functions from the RAM and reloads them from the slow disk th...

7 días hace | 1

| aceptada

Respondida
Escaped character '\U' is not valid. See 'doc sprintf' for supported special support.
It is a typical bug under Windows, which does not occur, when the software is tested successfully in Linux: fprintf(['Current f...

7 días hace | 0

Respondida
Detect if user has a valid MatLab license
The detection is not trivial. A matching license file might be there, but the license can be expired. The computer or license se...

7 días hace | 0

Respondida
Generating 60 random samples that sum to 1, each subject to a unique lower and upper limit
Isn't this a job for: https://www.mathworks.com/matlabcentral/fileexchange/9700-random-vectors-with-fixed-sum ? % [x,v] = randf...

8 días hace | 0

Respondida
checking if field values in a single struct are identical
Depending on how the inputs look exactly, maybe: FieldC = struct2cell(S); Eq = true; for k = 2:numel(FieldC) if ~isequal...

8 días hace | 0

Respondida
Trying to extract data trail by trail, but my data is sampled at different sampling rate.
If one signal is measured with 1000 Hz and another with 2000 Hz, it is trivial to determine timepoints of the first one in the t...

8 días hace | 0

Respondida
How not repeat the main loop, if other options are selected?
The description is not really clear. I assume, you want a list of menus to be selected one after the other. Then: status = 0; ...

9 días hace | 0

Respondida
How can I generate the Radom number between two set of floating point number?
Gain0 = 0.0000250002787160545; Bias0 = -0.124315307973192; Gain = Gain0 + Gain0 * 0.18 * (rand(1, 160) - 0.5); Bias = Bias0...

9 días hace | 0

| aceptada

Respondida
How do I properly convert a 64-bit binary string / Convert directly from bin or hex to uint64
The question explains with many details, where the numbers are coming from. It would be more useful to post a set aof available ...

9 días hace | 0

Respondida
Fast computation of entries of large matrix
n = 2500; x1=rand(n, 5); % some matrix with high number of rows and small number of columns > 1 x2=rand(n, 5); % anoth...

10 días hace | 0

Respondida
2nd order euler method problem
You have to convert the 2nd order equation to a system of order 1 at first. Accumulating dx2/dt2 is not meaingful. The 2nd deri...

10 días hace | 0

Respondida
I tried dragging an image into the edit box for an answer on Matlab Central and doing so destroyed my answer.
Yes, I can confirm this behavior. For Firefox/Windows: When I drag an image into the field for editing (or anywhere else on th...

10 días hace | 0

Respondida
Renaming multiple files in a folder
Folder = 'C:\Your\Folder'; FileList = dir(fullfile(Folder), 'Antenna_REF_*.s2p'); for k = 1:numel(FileList) oldName = Fi...

10 días hace | 1

Respondida
How to vectorize nested loops with conditional statements?
tributary = randn([81, 126]); cp_mesh = randn([81, 126, 49792]); tic cp_B1_2 = zeros(49792, 1); for i = 1:4979 % 49792 ...

11 días hace | 0

| aceptada

Respondida
what does this error mean and how to fix it the image i imported was rgb and this error popped ,when its gray it works fine
imshow can handle RGB images as [M x N x 3] arrays and gray scale images as [M x N] matrices. The latter can be a logical matrix...

13 días hace | 0

| aceptada

Respondida
memoize => Save/Restore Cache
There is no documented way to store the cache. But it is cheap to create a look-up table for your function and store it manually...

13 días hace | 0

Respondida
Select only the matrices within the cell
C = {rand(2), [], rand(3), [], [], rand(4)}; newC = C(~cellfun('isempty', C))

14 días hace | 0

Respondida
how to create a struct that would have number of fields that corresponds to the number of iterations inside a loop and also automatically save this data
Result = struct(); for day = 1:7 % No loop needed: MPE1 = signal(:, :, day) - signal(:, :, day) - kE1 * (signal(:, ...

14 días hace | 0

| aceptada

Respondida
How to create all possible matrices of zeros and ones without having more than one '1' in the same column?
n = 3; m = 4; c = n^m; X = cell(1, c); % List of outputs v = n .^ (1-m:0); % Calculate expensive power operation once f...

15 días hace | 0

Respondida
Error using plot vectors must be the same length
The error message is clear. Use the debugger to examine the reasons: dbstop if error Type this in the command window an run th...

15 días hace | 0

Respondida
MATLAB and several command prompt commands
Try this under Windows: for i = 0:7 command = sprintf('tftp -i 192.168.178.100 get dmafiles-%d && exit &', i); % ...

15 días hace | 0

Respondida
complicated vectorization of for loop wich icludes if and referes back to last loop iteration results
Why do you assume, that a vectorization is faster? Neither loops nor IF-conditions are slow in modern Matlab versions. Your cod...

16 días hace | 0

Respondida
I am facing an error "invalid file identifier" while using fprintf and fopen
Whenever you try to open a file, check the success: [file_1, msg] = fopen(outputFileName, 'w'); assert(file_1 > 0, msg); Now ...

16 días hace | 1

Enviada


FileRename
Fast renaming of files or folders

19 días hace | 10 descargas |

Thumbnail

Cargar más