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.

Answered

How to definie FontSize for Ticks on Axes when printing figures to files

Did you try export_fig already?

How to definie FontSize for Ticks on Axes when printing figures to files

Did you try export_fig already?

10 hours ago | 0

Answered

Undefined function or variable 'Throughtput_Cell'.

The error message is clear: There is no function in Matlab's path, which is called "Throughput_Cell.m". Do you assume, that the...

Undefined function or variable 'Throughtput_Cell'.

The error message is clear: There is no function in Matlab's path, which is called "Throughput_Cell.m". Do you assume, that the...

10 hours ago | 0

Answered

How to sort a table based off of values in one row in MATLAB

sortedTable = sortrows(SmallerTable, {'GroupB'})

How to sort a table based off of values in one row in MATLAB

sortedTable = sortrows(SmallerTable, {'GroupB'})

11 hours ago | 0

Answered

float to binary ?

Are you sure that there is a rounding? Or is it the display in the command window only? A = 0.569546; B = float2bin(A) C = bi...

float to binary ?

Are you sure that there is a rounding? Or is it the display in the command window only? A = 0.569546; B = float2bin(A) C = bi...

11 hours ago | 0

Answered

Why is unique() giving me the matrix after eliminating the common rows for these two matrices?

If you use a matrix as input to unique, a vector is replied. So if you matrix is not changed, it cannot be an output of unique()...

Why is unique() giving me the matrix after eliminating the common rows for these two matrices?

If you use a matrix as input to unique, a vector is replied. So if you matrix is not changed, it cannot be an output of unique()...

11 hours ago | 0

Answered

Index exceeds the number of array elements (1)

With some guessing: EA is a scalar: EA = 0.0015*200*(10^9); Then you cannot access elements of EA > 1: for k = 1:NE ......

Index exceeds the number of array elements (1)

With some guessing: EA is a scalar: EA = 0.0015*200*(10^9); Then you cannot access elements of EA > 1: for k = 1:NE ......

11 hours ago | 0

Answered

No iso file in downloaded zip file?

Yes: The downloaded ZIP file contains the contents of the ISO file. There is no reason to include an additional ISO file. Why do...

No iso file in downloaded zip file?

Yes: The downloaded ZIP file contains the contents of the ISO file. There is no reason to include an additional ISO file. Why do...

11 hours ago | 0

Answered

How to Find Index of Repeated Elements in a Vector?

x = [7, 22, 16, 20, 22, 3, 6, 22, 5] index = 5; a = x(5) index = find(x == a) % Or: [UniqX, iX, iUniqX] = unique(x)

How to Find Index of Repeated Elements in a Vector?

x = [7, 22, 16, 20, 22, 3, 6, 22, 5] index = 5; a = x(5) index = find(x == a) % Or: [UniqX, iX, iUniqX] = unique(x)

11 hours ago | 1

| accepted

Answered

Sort tables within a cell by size

Try this - I cannot check it, because I do not have your input data: Len = cellfun(@length, C); [~, index] = sort(Len); C = C...

Sort tables within a cell by size

Try this - I cannot check it, because I do not have your input data: Len = cellfun(@length, C); [~, index] = sort(Len); C = C...

14 hours ago | 0

| accepted

Answered

How to create column vector by the transpose?

The quote ' is not the transpose operator, but the complex transposition. To be exact the tranpose operator is .' including t...

How to create column vector by the transpose?

The quote ' is not the transpose operator, but the complex transposition. To be exact the tranpose operator is .' including t...

1 day ago | 1

| accepted

Answered

How to bring Data in usable form?

To be able to guess, what "usable" means, we need to know, what do you want to use the data for. Maybe you should convert the ti...

How to bring Data in usable form?

To be able to guess, what "usable" means, we need to know, what do you want to use the data for. Maybe you should convert the ti...

1 day ago | 1

Answered

When using ODE45, can I specify a variable to assume two different values during the timespan?

ODE45 is designe to integrate smooth functions only. To change a parameter you have to integrate in chunks: tSwitch1 = 10.0 tS...

When using ODE45, can I specify a variable to assume two different values during the timespan?

ODE45 is designe to integrate smooth functions only. To change a parameter you have to integrate in chunks: tSwitch1 = 10.0 tS...

1 day ago | 0

Answered

Loop to iterate ode45 function

figure; axes('NextPlot', 'add'); for e = 0:0.2:1 [t, x] = ode45(@(t, y) F(t, y, e), [0, 20], [0, 1]); plot(t, x(:,1)...

Loop to iterate ode45 function

figure; axes('NextPlot', 'add'); for e = 0:0.2:1 [t, x] = ode45(@(t, y) F(t, y, e), [0, 20], [0, 1]); plot(t, x(:,1)...

1 day ago | 0

| accepted

Answered

Find intersection between two curves

The intersection is the location, where both functions have the same value. Then their difference is 0. You can use fzero with ...

Find intersection between two curves

The intersection is the location, where both functions have the same value. Then their difference is 0. You can use fzero with ...

1 day ago | 0

| accepted

Answered

How to downsample cell arrays based on specific criteria?

It would be much easier to reduce the number of points before you convert the nermical data to cell arrays. See my answer in th...

How to downsample cell arrays based on specific criteria?

It would be much easier to reduce the number of points before you convert the nermical data to cell arrays. See my answer in th...

1 day ago | 1

| accepted

Answered

Why is the upper axis grid not visible after exporting to .eps image

Did you enable the box? set(gca, 'Box', 'on')

Why is the upper axis grid not visible after exporting to .eps image

Did you enable the box? set(gca, 'Box', 'on')

1 day ago | 0

| accepted

Answered

Finding Maximum Iterations for False Position Method

The rule of thumb is to limit the runtime to a duration, the user can bear. So waiting for an hour to detect, that the algorithm...

Finding Maximum Iterations for False Position Method

The rule of thumb is to limit the runtime to a duration, the user can bear. So waiting for an hour to detect, that the algorithm...

1 day ago | 0

Answered

How can compute sequential occurrence of elements in a vector

x = [ 0 0 0 0 1 1 1 1 1 0 0 0 2 2 2 2 0 0 0 0 0 3 3 3 3 3 3]; change = [true, diff(x) < 0, true]; index = diff(find(change))

How can compute sequential occurrence of elements in a vector

x = [ 0 0 0 0 1 1 1 1 1 0 0 0 2 2 2 2 0 0 0 0 0 3 3 3 3 3 3]; change = [true, diff(x) < 0, true]; index = diff(find(change))

1 day ago | 1

| accepted

Answered

How can I transmit multiple variables to a function in the form of a single array?

You can use a struct: S.a = a; S.b = b; ... [output1,output2] = multi_input(S) function [output1,output2] = multi_input(S...

How can I transmit multiple variables to a function in the form of a single array?

You can use a struct: S.a = a; S.b = b; ... [output1,output2] = multi_input(S) function [output1,output2] = multi_input(S...

1 day ago | 0

Answered

HOW CAN I SOLVE THIS?

What are the possible numbers in IEEE 754 floating point values between 1.0 and 2.0? x = 1.0 + k * 2^-52 with k = 0, 1, ... ...

HOW CAN I SOLVE THIS?

What are the possible numbers in IEEE 754 floating point values between 1.0 and 2.0? x = 1.0 + k * 2^-52 with k = 0, 1, ... ...

2 days ago | 0

Answered

Generate cell of random numbers with same size arrays

Creating a large array only to split it into parts needs more RAM than creating the random matrices in parts directly: C = cell...

Generate cell of random numbers with same size arrays

Creating a large array only to split it into parts needs more RAM than creating the random matrices in parts directly: C = cell...

2 days ago | 1

| accepted

Answered

How can I record mouse clicks (left and right) with coordinates and time?

You can emulate this with WindowsAPI. Setting the window completely invisble does not work, because with Alpha=0.0 the mouse eve...

How can I record mouse clicks (left and right) with coordinates and time?

You can emulate this with WindowsAPI. Setting the window completely invisble does not work, because with Alpha=0.0 the mouse eve...

3 days ago | 0

Answered

Butterworth Bandpass Filter Design

See https://www.mathworks.com/matlabcentral/answers/273811-butterworth-filtering-with-bandpass-and-3-order

Butterworth Bandpass Filter Design

See https://www.mathworks.com/matlabcentral/answers/273811-butterworth-filtering-with-bandpass-and-3-order

3 days ago | 0

Answered

num2str format

What does "I get a number from an API: 8.1784e+17" mean? Is this a char vector, string or a UINT64 or double scalar? In the last...

num2str format

What does "I get a number from an API: 8.1784e+17" mean? Is this a char vector, string or a UINT64 or double scalar? In the last...

3 days ago | 0

| accepted

Answered

How can I get a loop to process all ".avi" files in a folder, then produce the corresponding ".txt" and ".png" file?

function FileExample() Folder = uigetdir('','Select Input-folder'); FileList = dir(fullfile(Folder, '**', '*.avi')); % Select...

How can I get a loop to process all ".avi" files in a folder, then produce the corresponding ".txt" and ".png" file?

function FileExample() Folder = uigetdir('','Select Input-folder'); FileList = dir(fullfile(Folder, '**', '*.avi')); % Select...

3 days ago | 0

Answered

Array indices must be positive integers or logical values.

Nn = 1:2:30; Nn(i) = 60; Without a further definition, i is a constant with the value sqrt(-1). So which element to you wan...

Array indices must be positive integers or logical values.

Nn = 1:2:30; Nn(i) = 60; Without a further definition, i is a constant with the value sqrt(-1). So which element to you wan...

3 days ago | 0

Answered

Multiply two terms at a set distance apart from each other in an array

The loop method: array = rand(1, 950); for i = 1:950 - 23 v = array(i+23) * array(i) end Stephen's vectorized approach ...

Multiply two terms at a set distance apart from each other in an array

The loop method: array = rand(1, 950); for i = 1:950 - 23 v = array(i+23) * array(i) end Stephen's vectorized approach ...

4 days ago | 0

Answered

How to deal with nested arrays where the columns and rows are in different dimensions?

I do not undestand why "Text Nr.1" appears multiple times. If this is a typo only: In = {your cell}; Out = cell(size(In)); f...

How to deal with nested arrays where the columns and rows are in different dimensions?

I do not undestand why "Text Nr.1" appears multiple times. If this is a typo only: In = {your cell}; Out = cell(size(In)); f...

4 days ago | 1

| accepted

Answered

multiple default files for uigetfile

Under Windows this works: % Select multiple M-files: [File, Folder] = uigetfile('*.m', 'Choose files', '', 'Multiselect', 'on'...

multiple default files for uigetfile

Under Windows this works: % Select multiple M-files: [File, Folder] = uigetfile('*.m', 'Choose files', '', 'Multiselect', 'on'...

4 days ago | 0

Question

PARFOR in real applications

I've installed the Parallel Computing Toolbox for some experiments with my code. To my surprise none of the codes run faster wit...

5 days ago | 0 answers | 0