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

Question

legend() has an issue with 'Selected' or 'selected'

The command legend() has an issue with 'Selected' as a legend name. E.g.: t = -13:13; A = t*2-3*t; B = A(A>0); figure plo...

9 days ago | 1 answer | 0

Question

Symbolic Toolbox Issue with symbolic integration

There is an error problem in Symbolic toolbox while evaluating a symbolic integration formulation. Here is an example: >> syms ...

9 days ago | 1 answer | 0

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.

3 months 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...

3 months 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...

3 months 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...

3 months 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...

3 months ago | 0

Answered

How to read different bits from a binary file?

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

How to read different bits from a binary file?

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

3 months ago | 0

| accepted

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 ...

3 months 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...

3 months 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...

3 months ago | 0