https://sites.google.com/site/kolukulasivasrinivas/

Professional Interests: Mathematical Computing

Answered

find slope sign change of emg signal

If (t,x) is your time and signal. dt = diff(t) ; dx = diff(x) ; slope = dx./dt ; slope_sign = sign(slop) ;

find slope sign change of emg signal

If (t,x) is your time and signal. dt = diff(t) ; dx = diff(x) ; slope = dx./dt ; slope_sign = sign(slop) ;

1 day ago | 0

Answered

Find datetime in a vector

Use ismember Or idx = knnsearch(datenum(t_ref),datenum(t1)) ; t_ref(idx) t1 Or dt = abs((datenum(t_ref)-datenum(t1))) ;...

Find datetime in a vector

Use ismember Or idx = knnsearch(datenum(t_ref),datenum(t1)) ; t_ref(idx) t1 Or dt = abs((datenum(t_ref)-datenum(t1))) ;...

1 day ago | 0

| accepted

Answered

convert block cell to image

Let I be your 8*8 cell block .. iwant = cell2mat(I) ;

convert block cell to image

Let I be your 8*8 cell block .. iwant = cell2mat(I) ;

1 day ago | 0

Answered

Moving a Polygon on a Polygon

pgon = polyshape([440 0 0 440], [0 0 5.1 5.1]); path = [1:5:100 100:-5:1] ; for i = path pgon2 = polyshape([18 0 0 18]+i...

Moving a Polygon on a Polygon

pgon = polyshape([440 0 0 440], [0 0 5.1 5.1]); path = [1:5:100 100:-5:1] ; for i = path pgon2 = polyshape([18 0 0 18]+i...

3 days ago | 1

| accepted

Answered

How do I solve backslash issue in this case?

Replace this line: filename = strcat(selpath,imageFolder(i).name); with: filename = fullfile(selpath,imageFolder(i).name); I...

How do I solve backslash issue in this case?

Replace this line: filename = strcat(selpath,imageFolder(i).name); with: filename = fullfile(selpath,imageFolder(i).name); I...

3 days ago | 2

| accepted

Answered

"Warning: Name is nonexistent or not a directory: " Error Message if I enter the path of a file I want to import

thepath = '' ; % copy your path here in quotations filename = '' ; % give your file name in quotations with extension the...

"Warning: Name is nonexistent or not a directory: " Error Message if I enter the path of a file I want to import

thepath = '' ; % copy your path here in quotations filename = '' ; % give your file name in quotations with extension the...

3 days ago | 0

| accepted

Answered

Finding location of minimum in 3d array

It is asked multiple times..you may search in the forum. For EXample: https://in.mathworks.com/matlabcentral/answers/52341-min...

Finding location of minimum in 3d array

It is asked multiple times..you may search in the forum. For EXample: https://in.mathworks.com/matlabcentral/answers/52341-min...

3 days ago | 0

| accepted

Answered

Save and load matrix. Size problem

Check M1 might be a structure......try size(M1.Mat1)

Save and load matrix. Size problem

Check M1 might be a structure......try size(M1.Mat1)

3 days ago | 1

| accepted

Answered

How to smooth a surface of 3-d geometry

Are you looking for something like this? dt = delaunayTriangulation(Xm,Ym) ; t = dt.ConnectivityList ; x = dt.Points(:,...

How to smooth a surface of 3-d geometry

Are you looking for something like this? dt = delaunayTriangulation(Xm,Ym) ; t = dt.ConnectivityList ; x = dt.Points(:,...

3 days ago | 0

Answered

Ouputting all the permutations with repeated symbols in MATLAB

Read about perms. After this, you can try unique and get the required output. str = 'Mississippi' ; S = perms(str) ; iwa...

Ouputting all the permutations with repeated symbols in MATLAB

Read about perms. After this, you can try unique and get the required output. str = 'Mississippi' ; S = perms(str) ; iwa...

3 days ago | 0

| accepted

Answered

running a code on all columns

Y = rand(1000,100) ; iwant = zeros(20,50,100) ; for i = 1:100 Y1 = Y(:,i) ; S1 = numel(Y1); % this is same alway...

running a code on all columns

Y = rand(1000,100) ; iwant = zeros(20,50,100) ; for i = 1:100 Y1 = Y(:,i) ; S1 = numel(Y1); % this is same alway...

4 days ago | 0

| accepted

Answered

WHEN I DO INVERSE OF MY MATRIX IT GIVE VERY LARGE VALUE AND MULTIPLICATION OF (inv(H).*J) GIVE INCORRECT VALUE. can you resolve it

YOur H is a rank deficeint matrix...check rank(H) rank of H is 2. Also check it's determinant is zero. So you have only two i...

WHEN I DO INVERSE OF MY MATRIX IT GIVE VERY LARGE VALUE AND MULTIPLICATION OF (inv(H).*J) GIVE INCORRECT VALUE. can you resolve it

YOur H is a rank deficeint matrix...check rank(H) rank of H is 2. Also check it's determinant is zero. So you have only two i...

9 days ago | 0

Answered

Saving animation of projectile motion

Convert your animation into .gif file: https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-ima...

Saving animation of projectile motion

Convert your animation into .gif file: https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-ima...

10 days ago | 0

Answered

Levelling of 3D built in stl file

Download this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/22409-stl-file-reader [t,p] = stlre...

Levelling of 3D built in stl file

Download this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/22409-stl-file-reader [t,p] = stlre...

10 days ago | 0

Answered

could you please tell me how to plot 2 objects with different velocity

close all; clc; vA = [2.31; -0.55]; % initial velocity OF 1 vB = [2.31; -0.55]; % initial velocity OF 1 dt = 0.1; ...

could you please tell me how to plot 2 objects with different velocity

close all; clc; vA = [2.31; -0.55]; % initial velocity OF 1 vB = [2.31; -0.55]; % initial velocity OF 1 dt = 0.1; ...

10 days ago | 0

| accepted

Answered

How to create 3D interpolated surface from separate lines in different arrays

Join all the points you have into a matrix of size n*3..i.e in the form (x,y,z). Not you have scattered data in hand. Do interpo...

How to create 3D interpolated surface from separate lines in different arrays

Join all the points you have into a matrix of size n*3..i.e in the form (x,y,z). Not you have scattered data in hand. Do interpo...

11 days ago | 0

Answered

If I have two 2-D datasets with identical dimension sizes, how can I filter data from one at certain gridpoints where the other dataset meets a certain condition?

A = randi([1 5],5,5) ; % shapes B = rand(5) ; % data [c,ia,ib]= unique(A) ; N = length(c) ; % GEt max values ...

If I have two 2-D datasets with identical dimension sizes, how can I filter data from one at certain gridpoints where the other dataset meets a certain condition?

A = randi([1 5],5,5) ; % shapes B = rand(5) ; % data [c,ia,ib]= unique(A) ; N = length(c) ; % GEt max values ...

11 days ago | 0

| accepted

Answered

Computing the optimal split dimension of an image.

Refer here: https://in.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix-i-want-to-take-mean-of-each-4-4-so-that-...

Computing the optimal split dimension of an image.

Refer here: https://in.mathworks.com/matlabcentral/answers/362262-i-have-a-32-32-matrix-i-want-to-take-mean-of-each-4-4-so-that-...

12 days ago | 0

Answered

Nearest neighbor distribution and spherical contact distribution

Read about knnsearch and rangesearch.

Nearest neighbor distribution and spherical contact distribution

Read about knnsearch and rangesearch.

12 days ago | 0

Answered

Use intersect function in model

[same,ia,ib] = intersect(a,b,'rows') ; a(sort(ia),:)

Use intersect function in model

[same,ia,ib] = intersect(a,b,'rows') ; a(sort(ia),:)

12 days ago | 0

Answered

How to overcome this problem; Error using - Matrix dimensions must agree.

Two options: Reduce dimensions psi = psi(1:101,1:108) ; p = p(1:101,1:108) ; En =sqrt(((psi-p)^2)/psi^2); Do interpolat...

How to overcome this problem; Error using - Matrix dimensions must agree.

Two options: Reduce dimensions psi = psi(1:101,1:108) ; p = p(1:101,1:108) ; En =sqrt(((psi-p)^2)/psi^2); Do interpolat...

12 days ago | 0

| accepted

Answered

How to solve "Subscripted assignment dimension mismatch"?

What the necessity to save those images into a bigger image? USe montage. Read about it.

How to solve "Subscripted assignment dimension mismatch"?

What the necessity to save those images into a bigger image? USe montage. Read about it.

15 days ago | 0

Answered

How to plot Date on x axis and string on Y axis. Text annonation on Data points

Load data from excel to matlab using xlsread. Use this to use labels along the axes: https://in.mathworks.com/help/matlab/cre...

How to plot Date on x axis and string on Y axis. Text annonation on Data points

Load data from excel to matlab using xlsread. Use this to use labels along the axes: https://in.mathworks.com/help/matlab/cre...

15 days ago | 0

Answered

How to calculate post-pre connectivity matrices for multiple subjects

postfiles = dir('*post*.mat') ; m = length(postfiles) ; prefiles = dir('*pre*.mat') ; n = length(prefiles) ; post = zeros(51...

How to calculate post-pre connectivity matrices for multiple subjects

postfiles = dir('*post*.mat') ; m = length(postfiles) ; prefiles = dir('*pre*.mat') ; n = length(prefiles) ; post = zeros(51...

15 days ago | 0

Answered

Draw a circle and measure the white pixels area inside

I = imread('image.png') ; I1 = rgb2gray(I) ; [y,x] = find(I1) ; length(x)

Draw a circle and measure the white pixels area inside

I = imread('image.png') ; I1 = rgb2gray(I) ; [y,x] = find(I1) ; length(x)

16 days ago | 0

Answered

To crate a 2D lookup table with interpolation for matrix data and to crate a function of (x,y) (inputs) give the output from the matrix

Read about interp2. n = 20 ; Z = peaks(n) ; [X,Y] = meshgrid(1:n,1:n) ; [Xi,Yi] = meshgrid(1:0.1:n,1:0.1:n) ; Zi = i...

To crate a 2D lookup table with interpolation for matrix data and to crate a function of (x,y) (inputs) give the output from the matrix

Read about interp2. n = 20 ; Z = peaks(n) ; [X,Y] = meshgrid(1:n,1:n) ; [Xi,Yi] = meshgrid(1:0.1:n,1:0.1:n) ; Zi = i...

16 days ago | 1

Answered

how I can get Px,Py and Pz value ?

%% %Given Theta_1 =45; Theta_2 =10; Theta_3 =0; Theta_4 =90; Theta_5 =0; Theta_6 =45; %known a1 = 0.35; a3 = 0.3; a4 ...

how I can get Px,Py and Pz value ?

%% %Given Theta_1 =45; Theta_2 =10; Theta_3 =0; Theta_4 =90; Theta_5 =0; Theta_6 =45; %known a1 = 0.35; a3 = 0.3; a4 ...

16 days ago | 1

| accepted

Answered

How to convert a table into a structure

Read about table2struct. S = table2struct(T)

How to convert a table into a structure

Read about table2struct. S = table2struct(T)

17 days ago | 0

Answered

How can I select data in a pcolor plot by using a rectangle?

Read about interp2. Fix your (Xi,Yi) for which you want to extract the data and use interp2. Something like below: xi = lin...

How can I select data in a pcolor plot by using a rectangle?

Read about interp2. Fix your (Xi,Yi) for which you want to extract the data and use interp2. Something like below: xi = lin...

17 days ago | 0