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

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

2 days 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(' ...')

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

3 days ago | 0

Answered

Why does the array only work once?

Hi, You have overlooked a few dot operations. Here is the corrected part of your code: %Finding angle Phi of force P ...

Why does the array only work once?

Hi, You have overlooked a few dot operations. Here is the corrected part of your code: %Finding angle Phi of force P ...

3 days ago | 1

Answered

Variable indexing for loop when vector is negative (Array indices must be positive integers or logical values)

Hi, Vectorization is the most efficient way, e.g.: a = 12*x.^5; Or if you need to do via a loop, then for ii=1:numel(x) ...

Variable indexing for loop when vector is negative (Array indices must be positive integers or logical values)

Hi, Vectorization is the most efficient way, e.g.: a = 12*x.^5; Or if you need to do via a loop, then for ii=1:numel(x) ...

3 days ago | 0

Answered

How to check if a column data is equal to any of a group of values?

Altenrative (more efficient one) solution can be this one: S = sum(sum(ismember(A,B)))

How to check if a column data is equal to any of a group of values?

Altenrative (more efficient one) solution can be this one: S = sum(sum(ismember(A,B)))

3 days ago | 0

Answered

How to check if a column data is equal to any of a group of values?

You can use a loop for instance if you have many Bs, e.g.: for ii = 1:numel(B) Ind = A==B(ii); S(ii) = sum(Ind(:)); ...

How to check if a column data is equal to any of a group of values?

You can use a loop for instance if you have many Bs, e.g.: for ii = 1:numel(B) Ind = A==B(ii); S(ii) = sum(Ind(:)); ...

4 days ago | 0

Answered

Taylor Series for e^x with while loop

x = 1.5; SUM = 0; ANS = exp(x); Err = ANS-SUM; Err_Margin = 1e-9; ii=0; while Err > Err_margin ii=ii+1; ...

Taylor Series for e^x with while loop

x = 1.5; SUM = 0; ANS = exp(x); Err = ANS-SUM; Err_Margin = 1e-9; ii=0; while Err > Err_margin ii=ii+1; ...

4 days ago | 0

Answered

electromechanical relays and real time simulation

With your exercise, it is quite easy to employ Simulink/Simscape toolbox. See simulink dashboard tutorial: http://www.mathworks...

electromechanical relays and real time simulation

With your exercise, it is quite easy to employ Simulink/Simscape toolbox. See simulink dashboard tutorial: http://www.mathworks...

4 days ago | 0

Answered

I have a function to find the standard deviation of a matrix of scores, I now need to use that same standard deviation equation using the mean of said scores and get a scalar in return.

To get mean and median values of the whole class (e.g. Score of size 25-by-10) in one subject (e.g.: assignment # 1) should be c...

I have a function to find the standard deviation of a matrix of scores, I now need to use that same standard deviation equation using the mean of said scores and get a scalar in return.

To get mean and median values of the whole class (e.g. Score of size 25-by-10) in one subject (e.g.: assignment # 1) should be c...

4 days ago | 0

Answered

Excite Single Input of a MIMO System

Use switch block either manual or combinatorial switch block: http://se.xl48.cn/help/simulink/slref/manualswitch.html...

Excite Single Input of a MIMO System

Use switch block either manual or combinatorial switch block: http://se.xl48.cn/help/simulink/slref/manualswitch.html...

4 days ago | 0

Answered

Save Figure as JPEG or PNG from Vector Scope

Use: saveas() See: http://se.xl48.cn/help/matlab/ref/saveas.html

Save Figure as JPEG or PNG from Vector Scope

Use: saveas() See: http://se.xl48.cn/help/matlab/ref/saveas.html

4 days ago | 0

Answered

How to check if a column data is equal to any of a group of values?

Hi, Ind = sum(Ind1) + (Ind2);

How to check if a column data is equal to any of a group of values?

Hi, Ind = sum(Ind1) + (Ind2);

4 days ago | 0

Solved

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

4 days ago

Solved

Natural numbers in string form

Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

5 days ago

Solved

Fix the last element of a cell array

Note: this is lifted directly from <http://se.xl48.cn/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

5 days ago

Solved

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values

<http://se.xl48.cn/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

5 days ago

Solved

Cell Counting: How Many Draws?

You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

5 days ago

Solved

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

5 days ago

Solved

Convert a Cell Array into an Array

Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

5 days ago

Solved

Convert a numerical matrix into a cell array of strings

Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

5 days ago

Solved

Create a cell array out of a struct

Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

5 days ago

Solved

I Plead the Fifth

Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

11 days ago

Solved

Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.

Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

12 days ago

Solved

Energy of a photon

*⚛ ☢ ⚛ ☢ ⚛ ☢ ⚛* Given the frequency F of a photon in giga hertz. Find energy E of this...

12 days ago

Solved

Cell joiner

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

12 days ago

Solved

Pattern Sum

Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

12 days ago

Solved

Compute Fibonacci Number

Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

14 days ago

Solved

Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)

Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

17 days ago