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

Answered

Problem with Simulink onramp

Click on [Sine] block and hold [Ctrl] and then click on [Signal Assistant] block.

Problem with Simulink onramp

Click on [Sine] block and hold [Ctrl] and then click on [Signal Assistant] block.

alrededor de 4 horas ago | 0

Answered

Using MAX function to determine which year had the highest value

Create just a matrix array of your data, e.g. A = [...; ....]; Atab = array2table(A, 'VariableNames', {'Years', 'Ace', 'Tropic...

Using MAX function to determine which year had the highest value

Create just a matrix array of your data, e.g. A = [...; ....]; Atab = array2table(A, 'VariableNames', {'Years', 'Ace', 'Tropic...

alrededor de 4 horas ago | 0

Answered

Plotting a piecewise curve

% Vectorization is much more efficient and thus, it is better to use it here: n=100; tau =0.2; t = (n-1)*tau:tau/n:n*tau; Use...

Plotting a piecewise curve

% Vectorization is much more efficient and thus, it is better to use it here: n=100; tau =0.2; t = (n-1)*tau:tau/n:n*tau; Use...

alrededor de 4 horas ago | 0

Answered

While loop to get correct user input

Use this string comparison command instead of simple comparison in your IF condition: strncmpi(material, 'uran', 4) || strncmp...

While loop to get correct user input

Use this string comparison command instead of simple comparison in your IF condition: strncmpi(material, 'uran', 4) || strncmp...

alrededor de 6 horas ago | 0

Answered

Matlab Vectors for optimization

Easy solution would be to employ: randi([2, 13], Ntimes) to generate A, B, C; Sum them up: A+B+C; Compare the summation value a...

Matlab Vectors for optimization

Easy solution would be to employ: randi([2, 13], Ntimes) to generate A, B, C; Sum them up: A+B+C; Compare the summation value a...

alrededor de 6 horas ago | 0

Answered

How to read three different bits from a binary file?

Just employ: 'unit16' instead of 'uint8'.

How to read three different bits from a binary file?

Just employ: 'unit16' instead of 'uint8'.

alrededor de 6 horas ago | 0

Answered

How to add values at blue dots in graphs?

You mean sum up the plotted blue 'square' marker data points? If so and you have only this plot as a data source, then you can ...

How to add values at blue dots in graphs?

You mean sum up the plotted blue 'square' marker data points? If so and you have only this plot as a data source, then you can ...

alrededor de 6 horas ago | 0

Answered

I keep getting "Array indices must be positive integers or logical values."

clearvars;clc x = .993 : 0.01 : 1.283; for n = 1 :length(x) f(n) = 7*x(n)^3 - 2*x(n)^2 + 7*x(n) - 14; % Index has to be n...

I keep getting "Array indices must be positive integers or logical values."

clearvars;clc x = .993 : 0.01 : 1.283; for n = 1 :length(x) f(n) = 7*x(n)^3 - 2*x(n)^2 + 7*x(n) - 14; % Index has to be n...

alrededor de 6 horas ago | 0

Answered

Change the frequency of an array

According to you exercise statement, this one works ok. f = input('Enter time frequency value: '); t0=0; dt = 1/f; tend = 30...

Change the frequency of an array

According to you exercise statement, this one works ok. f = input('Enter time frequency value: '); t0=0; dt = 1/f; tend = 30...

alrededor de 6 horas ago | 0

Answered

How to remove rows with an empty cell from a big data set?

Here are a couple of good examples given by MATWORKS contributors: https://www.mathworks.com/matlabcentral/answers/42464-finding...

How to remove rows with an empty cell from a big data set?

Here are a couple of good examples given by MATWORKS contributors: https://www.mathworks.com/matlabcentral/answers/42464-finding...

alrededor de 6 horas ago | 0

Answered

Removing NaN from matrix

Use isnan() and assign the value you want or remove the points containing NaNs. See help how to employ it: mathworks.com/help/ma...

Removing NaN from matrix

Use isnan() and assign the value you want or remove the points containing NaNs. See help how to employ it: mathworks.com/help/ma...

alrededor de 7 horas ago | 0

Answered

Adjust my Figure Size

You'd need to adjust your figure window (POsition, location and drawable area) sizes, respectively. Here is the help doc: https...

Adjust my Figure Size

You'd need to adjust your figure window (POsition, location and drawable area) sizes, respectively. Here is the help doc: https...

alrededor de 7 horas ago | 0

Answered

how can I create a struct with row vectors

It is quite straightforward to create row vector components for a Structure array. E.g.: t=linspace(0,13, 131); GT.Pos = randi...

how can I create a struct with row vectors

It is quite straightforward to create row vector components for a Structure array. E.g.: t=linspace(0,13, 131); GT.Pos = randi...

alrededor de 7 horas ago | 0

Answered

how can I put xls data in to 2D lookup table toolbox in simulink

You'd need to employ: (1) [From Spreadsheet] block in order to read your data in MS Excel file. Note that you can specify in yo...

how can I put xls data in to 2D lookup table toolbox in simulink

You'd need to employ: (1) [From Spreadsheet] block in order to read your data in MS Excel file. Note that you can specify in yo...

alrededor de 7 horas ago | 0

| accepted

Answered

Why shortcut Ctrl+T cannot uncomment the code in InitFcn of simulink model, but start the simulation?

In SImulink, the shortcut Ctrl+T is reserved for the "run" command that executes models. That's why it does not work for uncomme...

Why shortcut Ctrl+T cannot uncomment the code in InitFcn of simulink model, but start the simulation?

In SImulink, the shortcut Ctrl+T is reserved for the "run" command that executes models. That's why it does not work for uncomme...

alrededor de 21 horas ago | 0

| accepted

Answered

erf(3) evaluation with recursive trapezoid rule

You need to set: b = 3;

erf(3) evaluation with recursive trapezoid rule

You need to set: b = 3;

alrededor de 21 horas ago | 0

Answered

what type of signal is this?FIR filters

Here is the corrected code. Time domain vs. Frequency domain analysis of the signal t vs. xx: load firlab2 %% input = xx; ...

what type of signal is this?FIR filters

Here is the corrected code. Time domain vs. Frequency domain analysis of the signal t vs. xx: load firlab2 %% input = xx; ...

alrededor de 23 horas ago | 0

| accepted

Answered

Problem with Newton Raphson Method for Two Variables

close all; clc,clear % Newton Raphson solution of two nonlinear algebraic equations xy = [0 1]; % initial guesses iter=0; ma...

Problem with Newton Raphson Method for Two Variables

close all; clc,clear % Newton Raphson solution of two nonlinear algebraic equations xy = [0 1]; % initial guesses iter=0; ma...

alrededor de 23 horas ago | 0

Answered

execute function if any evaluation is found to be false

if strcmp(TrueValMat{2,1}, BOX(1,:))==false... && strcmp(TrueValMat{2,2}, BOX(2,:))==false... ...

execute function if any evaluation is found to be false

if strcmp(TrueValMat{2,1}, BOX(1,:))==false... && strcmp(TrueValMat{2,2}, BOX(2,:))==false... ...

12 días ago | 1

Answered

Values of X where the function is between -0.5 and 0.5

syms x y fplot(legendreP(2:10, x), [-.5, .5]); axis([-0.5 0.5 -.5 .5])

Values of X where the function is between -0.5 and 0.5

syms x y fplot(legendreP(2:10, x), [-.5, .5]); axis([-0.5 0.5 -.5 .5])

12 días ago | 0

Answered

Sine Wave not recognize with find_system

You are right. Its name contains two words and because of that, supposedly it fails to locate it.

Sine Wave not recognize with find_system

You are right. Its name contains two words and because of that, supposedly it fails to locate it.

12 días ago | 1

Answered

Why do the ylabel renderings look different when Property Inspector says they are the same?

It looks like in the first one, "interpreter" option with "latex" has been employed. The second one is indeed is the default fon...

Why do the ylabel renderings look different when Property Inspector says they are the same?

It looks like in the first one, "interpreter" option with "latex" has been employed. The second one is indeed is the default fon...

12 días ago | 0

Answered

Having trouble writing conditional statements?

Hi, Here are the "if" conditions: if azimuths(n)> 90 && azimuths(n)<180 %condition 4 ... end ... if a...

Having trouble writing conditional statements?

Hi, Here are the "if" conditions: if azimuths(n)> 90 && azimuths(n)<180 %condition 4 ... end ... if a...

12 días ago | 1

Answered

i need help with my code, for error

Here are corrected part of your script: Ks=str2double(doubleKs{:}); Re=str2double(Re{:}); D = str2double(D{:}); % Data conv...

i need help with my code, for error

Here are corrected part of your script: Ks=str2double(doubleKs{:}); Re=str2double(Re{:}); D = str2double(D{:}); % Data conv...

12 días ago | 0

Answered

Creating a piecewise sine function having different frequency components

There are two opts. One elementwise multiplication and the other is just product. % (1) Elementwise: S1S2_e = s1.*s2; % (2) J...

Creating a piecewise sine function having different frequency components

There are two opts. One elementwise multiplication and the other is just product. % (1) Elementwise: S1S2_e = s1.*s2; % (2) J...

18 días ago | 0

Answered

Finding the index in two different arrays where values are closest

The answer is a quite straightforward that is to find the minimum of differences between the two lines. E.g.: DR = Rtrue1-Rtrue...

Finding the index in two different arrays where values are closest

The answer is a quite straightforward that is to find the minimum of differences between the two lines. E.g.: DR = Rtrue1-Rtrue...

alrededor de 1 mes ago | 0

Answered

Running anonymous function in MATLAB for sub-mesh.

Hi, Here is one of the viable solutuons to your exercise using the function option: clearvars % Number of circles to draw ...

Running anonymous function in MATLAB for sub-mesh.

Hi, Here is one of the viable solutuons to your exercise using the function option: clearvars % Number of circles to draw ...

alrededor de 1 mes ago | 0

| accepted

Answered

How to do FFT on accelerometer excel data in Matlab?

Import your data Perfform fft(). Here is a nice documentation how to sue fft().

How to do FFT on accelerometer excel data in Matlab?

Import your data Perfform fft(). Here is a nice documentation how to sue fft().

alrededor de 2 meses ago | 0

Answered

Plotting y = kx

k=1:999; x =1:2024; F = k.* x(:); N = 25; contour(k, x, F, N), shg xlabel('k stifness'), ylael(' ...')

Plotting y = kx

k=1:999; x =1:2024; F = k.* x(:); N = 25; contour(k, x, F, N), shg xlabel('k stifness'), ylael(' ...')

alrededor de 2 meses ago | 1

Answered

Viewing IMD binary data

You can read (import) binary data into MATLAB using fread() (see doc here) and then you can plot it to visualize, and so forth.

Viewing IMD binary data

You can read (import) binary data into MATLAB using fread() (see doc here) and then you can plot it to visualize, and so forth.

alrededor de 2 meses ago | 0