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

Solved

Project Euler: Problem 3, Largest prime factor

The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

12 hours ago

Solved

How many days in a month?

Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

12 hours ago

Solved

Separate even from odd numbers in a vector - with a loop

*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

12 hours ago

Solved

03 - Matrix Variables 2

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

12 hours ago

Solved

Find the nearest prime number

Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

13 hours ago

Solved

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

20 hours ago

Answered

strange for useing ' legend'

With this syntax on legend settings, it is working ok. close all; clear all; ... ... titlestr=''; xLabelStr='test1';...

strange for useing ' legend'

With this syntax on legend settings, it is working ok. close all; clear all; ... ... titlestr=''; xLabelStr='test1';...

20 hours ago | 0

Answered

Unit delay for adaptive filter!

(1) Simulink has a unit delay block that can be employed to resolve this issue in Simulink environment. (2) Help documentation ...

Unit delay for adaptive filter!

(1) Simulink has a unit delay block that can be employed to resolve this issue in Simulink environment. (2) Help documentation ...

20 hours ago | 0

Answered

Remove Delaunay triangles

These help documentations would give good insights on this: https://www.mathworks.com/help/matlab/math/creating-and-editing-...

Remove Delaunay triangles

These help documentations would give good insights on this: https://www.mathworks.com/help/matlab/math/creating-and-editing-...

20 hours ago | 0

Answered

which one of these is the right sol.? and let me know my mistakes please ..

Both gives the same results, if you fix in the second one the time boundary value for u1. ... A=3; B=4; C=4; t= 0: 0.02:5; ...

which one of these is the right sol.? and let me know my mistakes please ..

Both gives the same results, if you fix in the second one the time boundary value for u1. ... A=3; B=4; C=4; t= 0: 0.02:5; ...

21 hours ago | 0

Answered

How to find the position of input from function

x = 5:1:9; y = 6:1:10; z = cos(x)'* sin(y); z(4,3) % Row 4 & Column 3 x(4) % Row 4 because of cos(x)'* sin...

How to find the position of input from function

x = 5:1:9; y = 6:1:10; z = cos(x)'* sin(y); z(4,3) % Row 4 & Column 3 x(4) % Row 4 because of cos(x)'* sin...

21 hours ago | 0

Answered

How to read import csv file with reuqired header while importing reading csv file?

Here is the solution - data range specified and Variable names set true: DATA1 = readtable('WT_201120.csv', 'Range','A38:AZ6684...

How to read import csv file with reuqired header while importing reading csv file?

Here is the solution - data range specified and Variable names set true: DATA1 = readtable('WT_201120.csv', 'Range','A38:AZ6684...

21 hours ago | 0

| accepted

Answered

Compare two matrix in matlab

Easy and fast efficient solution is Logical Indexing, e.g.: IND = Data1==Data2 D1 = Data1(IND); D2 = Data2(IND); You can als...

Compare two matrix in matlab

Easy and fast efficient solution is Logical Indexing, e.g.: IND = Data1==Data2 D1 = Data1(IND); D2 = Data2(IND); You can als...

22 hours ago | 0

Answered

Roots of a polynomial with variables

One of the viable ways to solve such polynomial type equations is to setp up the solution space within which you are seeking the...

Roots of a polynomial with variables

One of the viable ways to solve such polynomial type equations is to setp up the solution space within which you are seeking the...

22 hours ago | 0

Answered

Which of these solutions is correct for a system of differential equations? And why do they give different results?

In this one, you have inserted a wrong sign: function dydt = fSystem(t, y, beta1, alpha2, beta2, p, psi, T) f2 = -alpha2*y(2)+...

Which of these solutions is correct for a system of differential equations? And why do they give different results?

In this one, you have inserted a wrong sign: function dydt = fSystem(t, y, beta1, alpha2, beta2, p, psi, T) f2 = -alpha2*y(2)+...

23 hours ago | 0

| accepted

Answered

Modal analysis of Vibration Data Using FFT

In FFT based freq response analysis, 150Hz sampling isn't appropriate for your data (6000 rpm = 100 Hz data). You should have co...

Modal analysis of Vibration Data Using FFT

In FFT based freq response analysis, 150Hz sampling isn't appropriate for your data (6000 rpm = 100 Hz data). You should have co...

1 day ago | 0

Answered

trigger when the clock change the hour

You may consider (1) Simulink block: https://www.mathworks.com/help/sldrt/ref/realtimesync.html Also, (2) this RTC fcn: https:...

trigger when the clock change the hour

You may consider (1) Simulink block: https://www.mathworks.com/help/sldrt/ref/realtimesync.html Also, (2) this RTC fcn: https:...

1 day ago | 0

Answered

How to specify index variable name of for loop programmatically?

Note that dynamically changing the variable names is not recommended practice. There are some points to be fixed in your code: ...

How to specify index variable name of for loop programmatically?

Note that dynamically changing the variable names is not recommended practice. There are some points to be fixed in your code: ...

1 day ago | 0

Answered

Can anyone share MR damper model for 2 DOF suspension model?

Here is a paper describing MR model in a few different versions built in Simulink environment. https://www.researchgate.net/pub...

Can anyone share MR damper model for 2 DOF suspension model?

Here is a paper describing MR model in a few different versions built in Simulink environment. https://www.researchgate.net/pub...

1 day ago | 0

Solved

Back to basics 15 - classes

Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

1 day ago

Solved

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

1 day ago

Solved

02 - Vector Variables 5

_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

1 day ago

Solved

03 - Matrix Variables 5

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

1 day ago

Solved

Converting binary to decimals

Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

1 day ago

Solved

03 - Matrix Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

1 day ago

Solved

03 - Matrix Variables 3

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

1 day ago

Solved

Back to basics 1 - Saving

Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

1 day ago

Solved

The Goldbach Conjecture, Part 2

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

1 day ago

Solved

The Goldbach Conjecture

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

1 day ago

Solved

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

1 day ago