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

Answered

using linear interpolation to find coefficients

Hi, use polyfit(); e.g. x = alpha; y = deBF; % then Coeff= polyfit(x, y, N); % N=1 linear fit, N=2 second order polynomia...

using linear interpolation to find coefficients

Hi, use polyfit(); e.g. x = alpha; y = deBF; % then Coeff= polyfit(x, y, N); % N=1 linear fit, N=2 second order polynomia...

1 day ago | 0

Answered

How to modify decimal places when exporting data with fprintf

Hi, Here is an easy solution with round(): a = {'C1', 'A1', 'B1'}' b = {'C', 'A', 'B'}' c = {1.1, 2.1, 3.1}' d = {1.16666...

How to modify decimal places when exporting data with fprintf

Hi, Here is an easy solution with round(): a = {'C1', 'A1', 'B1'}' b = {'C', 'A', 'B'}' c = {1.1, 2.1, 3.1}' d = {1.16666...

1 day ago | 0

Answered

Like finite element loop

hi, Here is the loop based solution: x = [1 2 3 4 5 6 7 8 9 10]; y = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1]; T0 = 293; c...

Like finite element loop

hi, Here is the loop based solution: x = [1 2 3 4 5 6 7 8 9 10]; y = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1]; T0 = 293; c...

2 days ago | 0

| accepted

Solved

Find the maximum number of decimal places in a set of numbers

Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

2 days ago

Solved

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

3 days ago

Solved

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

3 days ago

Answered

How to replace string by double in cell array

D1D=readtable('test.xlsx'); D1D.cc=str2double(D1D.cc);

How to replace string by double in cell array

D1D=readtable('test.xlsx'); D1D.cc=str2double(D1D.cc);

10 days ago | 0

| accepted

Answered

How to replace string by double in cell array

use a command: double() To get back your strings use the command: char()

How to replace string by double in cell array

use a command: double() To get back your strings use the command: char()

10 days ago | 0

Answered

Getting output as an array from while loop

Here is one of the viable solutions: a=0; x = input('Enter the number : ') ii=0; while x<100 ii=ii+1; if rem(x,2)==0...

Getting output as an array from while loop

Here is one of the viable solutions: a=0; x = input('Enter the number : ') ii=0; while x<100 ii=ii+1; if rem(x,2)==0...

11 days ago | 0

| accepted

Answered

Implement Module Predictive Control on Mathworks example

Launch Simulink, Open Library: Model Predictive Control toolbox/Automated Driving and drag and drop the block - daptive Crui...

Implement Module Predictive Control on Mathworks example

Launch Simulink, Open Library: Model Predictive Control toolbox/Automated Driving and drag and drop the block - daptive Crui...

11 days ago | 0

Answered

Automaticlly converting negative values to 0

Use a command int8() or int16() to store your processed data that resolves your task. e.g.: a= -89; b=int8(a)

Automaticlly converting negative values to 0

Use a command int8() or int16() to store your processed data that resolves your task. e.g.: a= -89; b=int8(a)

11 days ago | 0

| accepted

Answered

How to convert 2d matrix to 4d matrix?

It is going to be something like that: X(:,:,:,1)=a; X(:,:,:,2)=b; X(:,:,:,3)=c; X(:,:,:,4)=d;

How to convert 2d matrix to 4d matrix?

It is going to be something like that: X(:,:,:,1)=a; X(:,:,:,2)=b; X(:,:,:,3)=c; X(:,:,:,4)=d;

11 days ago | 0

Answered

Automaticlly converting negative values to 0

Store you data in int8 or int16

Automaticlly converting negative values to 0

Store you data in int8 or int16

11 days ago | 0

Answered

Automaticlly converting negative values to 0

uint8 cannot store -89 and thus, 0 Thus, store your data in int8 or better int16.

Automaticlly converting negative values to 0

uint8 cannot store -89 and thus, 0 Thus, store your data in int8 or better int16.

11 days ago | 0

Answered

How do I split cells in an array and save data into a bigger cell array?

Here is the alternative solution: arr = {'hello i welcome you';'what is your name';'nice to meet you'}; for i = 1:length(arr...

How do I split cells in an array and save data into a bigger cell array?

Here is the alternative solution: arr = {'hello i welcome you';'what is your name';'nice to meet you'}; for i = 1:length(arr...

11 days ago | 0

Answered

How do I split cells in an array and save data into a bigger cell array?

Here is one of the possible solutions: arr = {'hello i welcome you';'what is your name';'nice to meet you'}; output = { 'hel...

How do I split cells in an array and save data into a bigger cell array?

Here is one of the possible solutions: arr = {'hello i welcome you';'what is your name';'nice to meet you'}; output = { 'hel...

11 days ago | 0

Answered

dsolve error (simultaneous differential equations)

Here is the answer: clear all close clc m = 10; k = 1000; u0 = 0.01; syms y1(t) y2(t) Dy1=diff(y1); Dy2=diff(y2); D2...

dsolve error (simultaneous differential equations)

Here is the answer: clear all close clc m = 10; k = 1000; u0 = 0.01; syms y1(t) y2(t) Dy1=diff(y1); Dy2=diff(y2); D2...

11 days ago | 0

| accepted

Answered

How can I plot the signal in time domain before and after filtering?

See this example shows everything what you'd need: https://www.mathworks.com/help/matlab/ref/filter.html

How can I plot the signal in time domain before and after filtering?

See this example shows everything what you'd need: https://www.mathworks.com/help/matlab/ref/filter.html

16 days ago | 0

Answered

Poisson Process for 500 variates

Here is the alternative solution: T = 1; lambda = 12; t = linspace(0, T, 500); k=randi([1,10], 500); f = (lambda.^...

Poisson Process for 500 variates

Here is the alternative solution: T = 1; lambda = 12; t = linspace(0, T, 500); k=randi([1,10], 500); f = (lambda.^...

16 days ago | 1

Answered

Poisson Process for 500 variates

Why not to use MATLAB's built in fcn: poissrnd()

Poisson Process for 500 variates

Why not to use MATLAB's built in fcn: poissrnd()

16 days ago | 0

Answered

Warning: Unsuccessful read: A timeout occurred before the Terminator was reached..

Problem is in: fopen(s)

Warning: Unsuccessful read: A timeout occurred before the Terminator was reached..

Problem is in: fopen(s)

17 days ago | 0

Answered

People who are great at coding and App Designer for MATLAB, please help! I was trying to integrate and derive a complex equation using MATLAB but I just have one teeny piece of error, So What is my error?

Simple answer: e.g. Y(x) = 3*x+15; then Y = @(x)(3*x+15); apply for: u(e), w(e), R(e)...

People who are great at coding and App Designer for MATLAB, please help! I was trying to integrate and derive a complex equation using MATLAB but I just have one teeny piece of error, So What is my error?

Simple answer: e.g. Y(x) = 3*x+15; then Y = @(x)(3*x+15); apply for: u(e), w(e), R(e)...

21 days ago | 0

Answered

How do I show which variable is being plotted while using hold?

Here is one of the possible easy solutions: hx = phi_t * B hy = C * phi_t * B hx1 = []; hx2 = []; hx3 = []; hx4 = []; h...

How do I show which variable is being plotted while using hold?

Here is one of the possible easy solutions: hx = phi_t * B hy = C * phi_t * B hx1 = []; hx2 = []; hx3 = []; hx4 = []; h...

21 days ago | 0

Answered

How to draw a table?

use a command - array2table, e.g.: >>array2table(DATA, 'VariableNames', {'Mode_No','Intact','Damaged', 'Frequency'})

How to draw a table?

use a command - array2table, e.g.: >>array2table(DATA, 'VariableNames', {'Mode_No','Intact','Damaged', 'Frequency'})

21 days ago | 0

Answered

discretize stae space model for Kalman filter - Runge-Kutta 4th order

Check your equation that has some sign (-,+) problem (s). Here is a much simpler code: Vin=10; w=2*pi; Ts=w/(2*pi*2000); t...

discretize stae space model for Kalman filter - Runge-Kutta 4th order

Check your equation that has some sign (-,+) problem (s). Here is a much simpler code: Vin=10; w=2*pi; Ts=w/(2*pi*2000); t...

21 days ago | 0

| accepted

Answered

Why I got the error "Operator '-' is not supported for operands of type 'struct'."?

Answer: X= X.data(:,1); TempK = ((X1-32)*5/9)+273.15;

Why I got the error "Operator '-' is not supported for operands of type 'struct'."?

Answer: X= X.data(:,1); TempK = ((X1-32)*5/9)+273.15;

21 days ago | 0

Answered

Matlab workspace not showing the cell contents

Hi, It can be explained in a simple way. type in the following commands and try access the created cell array HG as shown in ...

Matlab workspace not showing the cell contents

Hi, It can be explained in a simple way. type in the following commands and try access the created cell array HG as shown in ...

21 days ago | 0

Answered

How to make a curve line through data points on surface 3D (curve line fitting in 3D)

Hi, Since you are plotting 3D plot of data, probably you're looking for a surface fit model. Then it is easy to use: cftool a...

How to make a curve line through data points on surface 3D (curve line fitting in 3D)

Hi, Since you are plotting 3D plot of data, probably you're looking for a surface fit model. Then it is easy to use: cftool a...

21 days ago | 0

Answered

problem with automized add_block destinations

you are accessing to your stored created block names in strings via their index numbers. That is it.

problem with automized add_block destinations

you are accessing to your stored created block names in strings via their index numbers. That is it.

21 days ago | 0

Answered

Matlab workspace not showing the cell contents

Hi, In the first picture you have accessed the matrix (variable called: f: 1x256 ) not a cell array see the hilighted. In the...

Matlab workspace not showing the cell contents

Hi, In the first picture you have accessed the matrix (variable called: f: 1x256 ) not a cell array see the hilighted. In the...

21 days ago | 0