157 total contributions since 2019

research interests: vibrations, optimal control, system modeling and simulation, mechatronics... coding

Answered

How can I update a constant block value based on the output results in simulink

Hi, In your case, if understood your problem correctly, one of the possible ways is to name the constant block value with a n...

How can I update a constant block value based on the output results in simulink

Hi, In your case, if understood your problem correctly, one of the possible ways is to name the constant block value with a n...

1 day ago | 0

Answered

Unwanted circles in graph (Simulink)

Hi, if I understood your question correctly, the circles you are referring are not circles but the data points from your simu...

Unwanted circles in graph (Simulink)

Hi, if I understood your question correctly, the circles you are referring are not circles but the data points from your simu...

1 day ago | 0

Answered

How can I sort the filenames in order given by dir()? I cannot turn a structure into a character array which means I cannot use sort, any tiips?

Hi, You'd need to use this syntax for char() command: h = char(File_names.name); With this, the command sort() sorts out the...

How can I sort the filenames in order given by dir()? I cannot turn a structure into a character array which means I cannot use sort, any tiips?

Hi, You'd need to use this syntax for char() command: h = char(File_names.name); With this, the command sort() sorts out the...

1 day ago | 0

Answered

Remove gravity factor from accelerometer

Hi, In your case, to reduce noise influence from your acceleration measurements with accelerometers you would need to employ ...

Remove gravity factor from accelerometer

Hi, In your case, to reduce noise influence from your acceleration measurements with accelerometers you would need to employ ...

1 day ago | 0

Answered

How to change the background colour of this image to 0 and foreground colour to 1 to make it binary.

Hi, Here is a short code that reads and separates the three layers of colors: AA = imread('Matrix.png'); R=AA(:,:,1); G=AA...

How to change the background colour of this image to 0 and foreground colour to 1 to make it binary.

Hi, Here is a short code that reads and separates the three layers of colors: AA = imread('Matrix.png'); R=AA(:,:,1); G=AA...

1 day ago | 0

Answered

Compare the entire elements of matrix with a number

Hi, Here is the one of the possible solutions: e=0.005; n=1:1000; H=(n-1)*e; A=[1 2 3; 3 4 5; 7 10 15]; for ii=1:100...

Compare the entire elements of matrix with a number

Hi, Here is the one of the possible solutions: e=0.005; n=1:1000; H=(n-1)*e; A=[1 2 3; 3 4 5; 7 10 15]; for ii=1:100...

2 days ago | 0

Answered

Creating an algorithm to average large data sets with numerical and non-numerical data?

Hi, Simple solution is to use isnan() to find out empty cells and set their values equal to 0, e.g.: A = xlsread('MY_data.xl...

Creating an algorithm to average large data sets with numerical and non-numerical data?

Hi, Simple solution is to use isnan() to find out empty cells and set their values equal to 0, e.g.: A = xlsread('MY_data.xl...

2 days ago | 0

Answered

How can an equation be obtained using four series of data?

Hi, Here is the way how to create equations from your data: ABCD=[5/78824 88/7762 19/878 0/889028; 6/00752 70/5228 23...

How can an equation be obtained using four series of data?

Hi, Here is the way how to create equations from your data: ABCD=[5/78824 88/7762 19/878 0/889028; 6/00752 70/5228 23...

2 days ago | 0

Answered

how to store a vector that i got from a for loop ?

Hi, Here is the solution to your loop based script to save all values: for i=1:3 a(i, :)=[2+i,i] d(i, :)=[5+2*i, 3*i] e...

how to store a vector that i got from a for loop ?

Hi, Here is the solution to your loop based script to save all values: for i=1:3 a(i, :)=[2+i,i] d(i, :)=[5+2*i, 3*i] e...

2 days ago | 0

Answered

How to save simulink model together with inputs given in matlab file?

Hi, Input arguments/variable values can be inserted within your simulink model in your case via Callbacks that can be accessed...

How to save simulink model together with inputs given in matlab file?

Hi, Input arguments/variable values can be inserted within your simulink model in your case via Callbacks that can be accessed...

8 days ago | 1

| accepted

Answered

How can I make 3D imagesc figure?

meshc() can be employed to plot with the given x, y, z data.

How can I make 3D imagesc figure?

meshc() can be employed to plot with the given x, y, z data.

8 days ago | 0

Answered

How to make a particular folder open in matlab for saving images?

In this case, to change directory with cd() command might be helpful to change the currrent directory to the directory where you...

How to make a particular folder open in matlab for saving images?

In this case, to change directory with cd() command might be helpful to change the currrent directory to the directory where you...

8 days ago | 0

| accepted

Answered

How to run through many variables at a different set of times continuously?

Probably, you can employ for loop (ii = 1:200) then combine/concatenate all evaloved values into separate variable(s). e.g. ...

How to run through many variables at a different set of times continuously?

Probably, you can employ for loop (ii = 1:200) then combine/concatenate all evaloved values into separate variable(s). e.g. ...

8 days ago | 0

Answered

Problem plotting two parametric equations

Hi, Here is the fixed code: w=linspace(0,1); mu= 0.1*w+0.14*(1-w); sigma = (0.12^2)*w.^2+0.4*0.12*0.2*2*w.*(1-w)+(0.2^2)*(...

Problem plotting two parametric equations

Hi, Here is the fixed code: w=linspace(0,1); mu= 0.1*w+0.14*(1-w); sigma = (0.12^2)*w.^2+0.4*0.12*0.2*2*w.*(1-w)+(0.2^2)*(...

8 days ago | 0

| accepted

Answered

takes time importing large data files

Hi, There are several builtin options/functions in MATLAB to get the data imported faster than import wizard or importdata()....

takes time importing large data files

Hi, There are several builtin options/functions in MATLAB to get the data imported faster than import wizard or importdata()....

9 days ago | 0

Answered

How do i model differential equations in simulink that are not time dependent ?

Hi, Yes, it is possible to solve this type of ODEs in SImulink. Here is the solution model attached. Note that the simulati...

How do i model differential equations in simulink that are not time dependent ?

Hi, Yes, it is possible to solve this type of ODEs in SImulink. Here is the solution model attached. Note that the simulati...

10 days ago | 1

Answered

How can I solve for coupled differential equations?

if FREQ = 0 ... 1000 Hz. Then you will have 1001 solutions with a freq step of 1 Hz. e.g. f = 0:1000; F = 5* 5 * (1i * 2 * pi...

How can I solve for coupled differential equations?

if FREQ = 0 ... 1000 Hz. Then you will have 1001 solutions with a freq step of 1 Hz. e.g. f = 0:1000; F = 5* 5 * (1i * 2 * pi...

25 days ago | 1

Answered

probleme with binarization my image

Hi, Here is a simple solution: clearvars DD=imread('image.bmp'); figure(1), imshow(DD), title('Original') M...

probleme with binarization my image

Hi, Here is a simple solution: clearvars DD=imread('image.bmp'); figure(1), imshow(DD), title('Original') M...

29 days ago | 0

Answered

How can I use Lorenz Attractor code?

Hi, You were not executing the codes properly. Here is a single code that associates both scripts into one. Now it is much si...

How can I use Lorenz Attractor code?

Hi, You were not executing the codes properly. Here is a single code that associates both scripts into one. Now it is much si...

30 days ago | 0

Answered

How can I use Lorenz Attractor code?

Hi Darwin, Here is my version of the Lorenz Atractor simulation code: function df = LORENZ_sys_1ODE(~, x) % HELP: Lorenz F...

How can I use Lorenz Attractor code?

Hi Darwin, Here is my version of the Lorenz Atractor simulation code: function df = LORENZ_sys_1ODE(~, x) % HELP: Lorenz F...

1 month ago | 0

Answered

Simout and solver step time

Hi Daniel, Your chosen time step 0.01 is showed up in your right zoomed in plot that is correct and can't be ideal step functio...

Simout and solver step time

Hi Daniel, Your chosen time step 0.01 is showed up in your right zoomed in plot that is correct and can't be ideal step functio...

1 month ago | 0

Answered

How to apply 2D hanning window to an image

Maybe this source would be helpful for you: https://www.mathworks.com/matlabcentral/answers/265430-ifft-of-a-hanning-windowed-ff...

How to apply 2D hanning window to an image

Maybe this source would be helpful for you: https://www.mathworks.com/matlabcentral/answers/265430-ifft-of-a-hanning-windowed-ff...

1 month ago | 0

| accepted

Answered

How can I plot segmented data with time?

if you want to use the whole time space of yours, e.g. 0 ... 40 s then you can use a linear interpalation, i.e. interp1. Good l...

How can I plot segmented data with time?

if you want to use the whole time space of yours, e.g. 0 ... 40 s then you can use a linear interpalation, i.e. interp1. Good l...

1 month ago | 0

Answered

How to split data from being in one excel file cell into multiple column

Ahmed, Could you please post your sample data in Excel file to test and provide a solution to your problem?

How to split data from being in one excel file cell into multiple column

Ahmed, Could you please post your sample data in Excel file to test and provide a solution to your problem?

1 month ago | 0

Answered

An error message using fmincon

Hi Ektor, You have done a good work except for two small flaws, but crucial ones. Here are the corrected scripts: function [...

An error message using fmincon

Hi Ektor, You have done a good work except for two small flaws, but crucial ones. Here are the corrected scripts: function [...

1 month ago | 0

| accepted

Answered

How do I make this for loop

Hi Nanny, Here is the loop based code of your problem: point = [105,308 162,470 200,150 ...

How do I make this for loop

Hi Nanny, Here is the loop based code of your problem: point = [105,308 162,470 200,150 ...

1 month ago | 0

Answered

Speaking the time in my code or codes

Hi, If I have understood your question correctly, here is the corrected code that speaks the current time: NET.addAssemb...

Speaking the time in my code or codes

Hi, If I have understood your question correctly, here is the corrected code that speaks the current time: NET.addAssemb...

1 month ago | 0

| accepted

Answered

I'm trying to solve a quadratic equation by varying a variable multiple times

Hi, Here is the corrected code: % Since you are trying to solve your system symbolically then you'd need to % assign symbo...

I'm trying to solve a quadratic equation by varying a variable multiple times

Hi, Here is the corrected code: % Since you are trying to solve your system symbolically then you'd need to % assign symbo...

1 month ago | 1

| accepted

Answered

Optimizing minimization with fmincon function

Hi, By setting up the solver algorithm in the option settings, the simulation time cna be shortened substantially. E.g. g=ra...

Optimizing minimization with fmincon function

Hi, By setting up the solver algorithm in the option settings, the simulation time cna be shortened substantially. E.g. g=ra...

1 month ago | 0

| accepted

Answered

Tune controller by using pidtune() with output disturbance instead of input disturbance

Hi Robert, In this case, I would suggest to take out your controller C from your system model and add it from the outside as ...

Tune controller by using pidtune() with output disturbance instead of input disturbance

Hi Robert, In this case, I would suggest to take out your controller C from your system model and add it from the outside as ...

1 month ago | 0