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

Answered

Fitting weird curve into exponential functions

Hi, Why not to use cftool (Curve Fitting Toolbox). Launch it with: >> cftool Indicate your x data and y data variable na...

Fitting weird curve into exponential functions

Hi, Why not to use cftool (Curve Fitting Toolbox). Launch it with: >> cftool Indicate your x data and y data variable na...

3 hours ago | 0

Answered

C = union( A,B ) is too slow. Is there any faster way given that A and B are ordered.

Hi, This one could be faster: ismember(A, B)

C = union( A,B ) is too slow. Is there any faster way given that A and B are ordered.

Hi, This one could be faster: ismember(A, B)

13 hours ago | 0

Answered

how to transfer a 3D variable into a row in an excel file?

Hi, a simple solution might be this one: for ii=1:14 % EEGData has 14 layers SH=strcat('Sheet', num2str(ii)); xls...

how to transfer a 3D variable into a row in an excel file?

Hi, a simple solution might be this one: for ii=1:14 % EEGData has 14 layers SH=strcat('Sheet', num2str(ii)); xls...

13 hours ago | 0

Answered

what is wrong here? ??? Error using ==> times Matrix dimensions must agree.

Hi, There is two small but crucial errs - see the command below: %... Fi=fftshift(double(A)); % NOTE your assigned var...

what is wrong here? ??? Error using ==> times Matrix dimensions must agree.

Hi, There is two small but crucial errs - see the command below: %... Fi=fftshift(double(A)); % NOTE your assigned var...

13 hours ago | 0

Answered

How can I index one array using element values from another array

Hi, Again using logical indexing might be one of the easy ways of doing it: Y_sub30 = y(z < 30); Total_sub30=sum(Y_sub30); ...

How can I index one array using element values from another array

Hi, Again using logical indexing might be one of the easy ways of doing it: Y_sub30 = y(z < 30); Total_sub30=sum(Y_sub30); ...

14 hours ago | 0

Answered

phase plot fft (strange)values

Hi, There was a small but crucial mistake while defining 's' signal. Here is the corrected one: s = cos(2*pi*15*t -30*pi/180...

phase plot fft (strange)values

Hi, There was a small but crucial mistake while defining 's' signal. Here is the corrected one: s = cos(2*pi*15*t -30*pi/180...

14 hours ago | 0

| accepted

Answered

Convert .mat file into .csv file

Hi, For your data, converting into xls or xlsx would be easier. If you'd need only csv, then you'd need to use the syntax as th...

Convert .mat file into .csv file

Hi, For your data, converting into xls or xlsx would be easier. If you'd need only csv, then you'd need to use the syntax as th...

1 day ago | 1

| accepted

Answered

Kindly help me to obtain the first four numerical solution of given trancedental equation "luck 1"

Use the commands: EQN = luck1==0 SOL = solve(EQN, x); SOL = double(SOL);

Kindly help me to obtain the first four numerical solution of given trancedental equation "luck 1"

Use the commands: EQN = luck1==0 SOL = solve(EQN, x); SOL = double(SOL);

1 day ago | 0

Answered

How to use linear regression modeling for x-vector of dimension m and y-vector of dimension m

Hi, If your given data for x and y are 1-by-1000 or 1-by-10000000 ... . Briefly speaking your data is 1D. Then you'd need to us...

How to use linear regression modeling for x-vector of dimension m and y-vector of dimension m

Hi, If your given data for x and y are 1-by-1000 or 1-by-10000000 ... . Briefly speaking your data is 1D. Then you'd need to us...

1 day ago | 0

Answered

Can display block show more than a 10x20 matrix?

Hi, There is an easy solution for your exercise that is to use "To Workspace" block instead of "Display" block. Then you will...

Can display block show more than a 10x20 matrix?

Hi, There is an easy solution for your exercise that is to use "To Workspace" block instead of "Display" block. Then you will...

1 day ago | 0

Answered

how to zoom-out on a figure window in a script

Hi, Here are two simple ways of solving your task: 1) using zoom() function, e.g.: figure, plot(rand(10,1),'bo-') zoom(0.75)...

how to zoom-out on a figure window in a script

Hi, Here are two simple ways of solving your task: 1) using zoom() function, e.g.: figure, plot(rand(10,1),'bo-') zoom(0.75)...

1 day ago | 0

Answered

Replace values in grid data (3D) to NaN, like another (3D) have NaN

It can be done very easily with a logical indexing opt: e.g.: Index = isnan(SST); VWind(Index)=NaN; Now you can compare and...

Replace values in grid data (3D) to NaN, like another (3D) have NaN

It can be done very easily with a logical indexing opt: e.g.: Index = isnan(SST); VWind(Index)=NaN; Now you can compare and...

4 days ago | 0

| accepted

Answered

Transfer Function with one 1/s term

Hi, It is straightforward: T = tf([1 0 1], [1 1 1 0]); nyquist(T)

Transfer Function with one 1/s term

Hi, It is straightforward: T = tf([1 0 1], [1 1 1 0]); nyquist(T)

4 days ago | 0

| accepted

Answered

Tensor Product According to Input (Dynamically)

If your variable sigma_x is 90 rotated eye matrix, then you can use A = rot90(eye(d)); Good luck

Tensor Product According to Input (Dynamically)

If your variable sigma_x is 90 rotated eye matrix, then you can use A = rot90(eye(d)); Good luck

1 month ago | 0

Answered

How to rename a bunch of files in a folder

Here is the answer that changes the file names to: 1a.tif, 2a.tif, 3a.tif, ..., etc. files = dir('*.tif'); for ii = 1:length(f...

How to rename a bunch of files in a folder

Here is the answer that changes the file names to: 1a.tif, 2a.tif, 3a.tif, ..., etc. files = dir('*.tif'); for ii = 1:length(f...

2 months ago | 0

Answered

How to generate a real time signal?

If what you need is a sort of white noise, then you can use random number generators, e.g.: rand() - uniform distributed, ran...

How to generate a real time signal?

If what you need is a sort of white noise, then you can use random number generators, e.g.: rand() - uniform distributed, ran...

2 months ago | 0

Answered

" Array dimensions must match for binary array op."

Here is one of the easy solutions: for jj=1:numel(ThAll) TH_all=ThAll{jj}; for kk=1:4 TH_ALL(jj, k...

" Array dimensions must match for binary array op."

Here is one of the easy solutions: for jj=1:numel(ThAll) TH_all=ThAll{jj}; for kk=1:4 TH_ALL(jj, k...

2 months ago | 0

Answered

Can someone advise how I fix this loop?

Hi, That would be somewhat in this way: for ii = 1:59 sFiles(ii).iStudy = bst_process('CallProcess', 'process_select_search...

Can someone advise how I fix this loop?

Hi, That would be somewhat in this way: for ii = 1:59 sFiles(ii).iStudy = bst_process('CallProcess', 'process_select_search...

2 months ago | 0

| accepted

Answered

Create plot handle without rendering it.

H = figure("Visible",false); HH = plot(1:5);

Create plot handle without rendering it.

H = figure("Visible",false); HH = plot(1:5);

2 months ago | 0

| accepted

Answered

saving variables programmatically using list of variable names

Here is an easy solution: a=1;b=2;c=3; save('myMatFile.mat','a','b','c') % Or a=1;b=2;c=3; MY_var = {'a','b','c'}; save(...

saving variables programmatically using list of variable names

Here is an easy solution: a=1;b=2;c=3; save('myMatFile.mat','a','b','c') % Or a=1;b=2;c=3; MY_var = {'a','b','c'}; save(...

2 months ago | 0

Answered

How to fix: Index Exceeds Matrix Dimensions

Put your file to be read in your current directory.

How to fix: Index Exceeds Matrix Dimensions

Put your file to be read in your current directory.

2 months ago | 0

| accepted

Answered

Return Indices for x Smallest/Largest Values in Array

here is one of the possible ways: A = [...; ...; ...]; [Row1,Col1]=find(max(A(:))==A) % Shows row# and col# of largest element...

Return Indices for x Smallest/Largest Values in Array

here is one of the possible ways: A = [...; ...; ...]; [Row1,Col1]=find(max(A(:))==A) % Shows row# and col# of largest element...

2 months ago | 1

Answered

How to fix: Index Exceeds Matrix Dimensions

Remove: (1) in filenames(1).name on line on line 88

How to fix: Index Exceeds Matrix Dimensions

Remove: (1) in filenames(1).name on line on line 88

2 months ago | 0

Answered

Why White Noise is not adding Uniformly to Signal?

In your plot section, you are plotting three sets instead of four and thus, the noise added signal is not showing up. See: ...

Why White Noise is not adding Uniformly to Signal?

In your plot section, you are plotting three sets instead of four and thus, the noise added signal is not showing up. See: ...

2 months ago | 0

Answered

How ı can write this function on Matlab

Hi, Here is one of the possible solutions for x having a single value: function Y = MY_fun(x) if x>=1 && x<10 Y = ex...

How ı can write this function on Matlab

Hi, Here is one of the possible solutions for x having a single value: function Y = MY_fun(x) if x>=1 && x<10 Y = ex...

2 months ago | 0

| accepted

Answered

Function Requests and receives from the user the dimensions of the sampled matrix until a proper value is obtained

function [R, C]=MD(m,n) while m<4 || m>10 || n>12 || n<7 disp('Wrong dimensions are entered: Enter new dimensions! ...

Function Requests and receives from the user the dimensions of the sampled matrix until a proper value is obtained

function [R, C]=MD(m,n) while m<4 || m>10 || n>12 || n<7 disp('Wrong dimensions are entered: Enter new dimensions! ...

2 months ago | 0

Answered

Tiff image to RGB

Hi, Here is a short code how you can start working on: F1 = 'Name'; % Name of your Tiff files as e.g.: Name1.tiff, Name2.ti...

Tiff image to RGB

Hi, Here is a short code how you can start working on: F1 = 'Name'; % Name of your Tiff files as e.g.: Name1.tiff, Name2.ti...

2 months ago | 0

Solved

Counting Money

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

2 months ago

Answered

Align thermal and RGB images

Did you accept the given source as a solution to your query?

Align thermal and RGB images

Did you accept the given source as a solution to your query?

2 months ago | 0