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

Professional Interests: Mathematical Computing

Answered

Find centre point of coordinates in three dimensional space and then calculate euler angles relative to the centre point.

Let A be your 2000X3 data points. YOu can get your center using mean C = mean(A) ; To get angle refer: https://in.mathworks...

Find centre point of coordinates in three dimensional space and then calculate euler angles relative to the centre point.

Let A be your 2000X3 data points. YOu can get your center using mean C = mean(A) ; To get angle refer: https://in.mathworks...

12 hours ago | 0

Answered

Problem in running my code

TN=4; n_vec=1:TN; n=n_vec; themax=[0.32 0.51 0.112 1.3]; B=0.3; Psi=0.6; No=0.01; tau=B./n; for Max=themax; h=ran...

Problem in running my code

TN=4; n_vec=1:TN; n=n_vec; themax=[0.32 0.51 0.112 1.3]; B=0.3; Psi=0.6; No=0.01; tau=B./n; for Max=themax; h=ran...

1 day ago | 0

Answered

Finding the minor and cofactor for a matrix using matlab

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/2284-introductory-linear-algebra-with-applications

Finding the minor and cofactor for a matrix using matlab

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/2284-introductory-linear-algebra-with-applications

1 day ago | 0

Answered

Get number of occurrences of value in a specific position in matrix

As you know the locations.....you have indices in hand.....pick those values......check with your value: iwant = nnz(matrixva...

Get number of occurrences of value in a specific position in matrix

As you know the locations.....you have indices in hand.....pick those values......check with your value: iwant = nnz(matrixva...

1 day ago | 0

Answered

Get a set of arrays as input from user in matlab function

Read about input prompt = 'Enter Array:'; x = input(prompt) ;

Get a set of arrays as input from user in matlab function

Read about input prompt = 'Enter Array:'; x = input(prompt) ;

1 day ago | 0

Answered

ode45 problem with plotting

You should change view to 1. And there is small change in the name of variable..hope the below one works: function [t,th,r...

ode45 problem with plotting

You should change view to 1. And there is small change in the name of variable..hope the below one works: function [t,th,r...

1 day ago | 0

| accepted

Answered

segment of large data .mat file of 2 hr in 5 minute .mat files

S = load('01911m.mat') ; val = S.val ; n = length(val) ; t = linspace(1,2*60,n) ; % get for every five mins ti = 1:round(n...

segment of large data .mat file of 2 hr in 5 minute .mat files

S = load('01911m.mat') ; val = S.val ; n = length(val) ; t = linspace(1,2*60,n) ; % get for every five mins ti = 1:round(n...

1 day ago | 0

Answered

how to merge two images of different file types?

It can be done: Read the image 1 say I1 Read the image 2 say I2 Get both I1, I2 to same size using imresize, if they are o...

how to merge two images of different file types?

It can be done: Read the image 1 say I1 Read the image 2 say I2 Get both I1, I2 to same size using imresize, if they are o...

1 day ago | 0

Answered

How do I save the contents of a structure as a textfile?

S = struct() ; S.time = (1:100)' ; S.values = rand(100,1) ; S.type = 'Wave form' ; S.unit = 'mv' ; S.samplerate = 300 ; ...

How do I save the contents of a structure as a textfile?

S = struct() ; S.time = (1:100)' ; S.values = rand(100,1) ; S.type = 'Wave form' ; S.unit = 'mv' ; S.samplerate = 300 ; ...

1 day ago | 0

Answered

Command to get specific row and column data to be displayed in the code

% Make dummy data A = [rand(10,1) rand(10,1)] ; s = ones(10,1) ; s(1:5) = -1; A(:,2) = s.*A(:,2) ; % get index of sign c...

Command to get specific row and column data to be displayed in the code

% Make dummy data A = [rand(10,1) rand(10,1)] ; s = ones(10,1) ; s(1:5) = -1; A(:,2) = s.*A(:,2) ; % get index of sign c...

1 day ago | 0

Answered

How to dynamically allocate labels to a legend?

n=5 ; lgd = cell(n,1) ; figure hold on for i=1:n plot(rand(10,1)) ; lgd{i} = strcat('X=',num2str(i)) ; end leg...

How to dynamically allocate labels to a legend?

n=5 ; lgd = cell(n,1) ; figure hold on for i=1:n plot(rand(10,1)) ; lgd{i} = strcat('X=',num2str(i)) ; end leg...

2 days ago | 0

Answered

Columb's law in Matlab

Actually this is an home work problem....we dont solve your home work problems.......As you have asked to give some insight and ...

Columb's law in Matlab

Actually this is an home work problem....we dont solve your home work problems.......As you have asked to give some insight and ...

2 days ago | 0

Answered

Plotting Multiple Histograms with Increasing Number of Bins

count = 0 ; for i = 1:3 for j = 1:3 count = count+1 ; subplot(3,3,count) plot(rand(3,1)) ...

Plotting Multiple Histograms with Increasing Number of Bins

count = 0 ; for i = 1:3 for j = 1:3 count = count+1 ; subplot(3,3,count) plot(rand(3,1)) ...

2 days ago | 1

Answered

Is there a way to code Matlab to show complete mathematical working of a solution?

Refer here: https://blogs.mathworks.com/pick/2009/02/06/plotaxisatorigin/ YOu shift the origin and change the tick labels...

Is there a way to code Matlab to show complete mathematical working of a solution?

Refer here: https://blogs.mathworks.com/pick/2009/02/06/plotaxisatorigin/ YOu shift the origin and change the tick labels...

2 days ago | 0

| accepted

Answered

Duplicate every element of a matrix to NxN elements

A = [1 2 3 4 ] ; [nx,ny] = size(A) ; B = cell(nx,ny) ; for i = 1:nx for j = 1:ny B{i,j} = repelem...

Duplicate every element of a matrix to NxN elements

A = [1 2 3 4 ] ; [nx,ny] = size(A) ; B = cell(nx,ny) ; for i = 1:nx for j = 1:ny B{i,j} = repelem...

2 days ago | 0

Answered

Plot 3 with data set and one equation

A= [ 0.7835 0.118 0.7939 0.115 0.8043 0.1121 0.8148 0.1093 0.8254 0.1066 0.8360 0.104 ...

Plot 3 with data set and one equation

A= [ 0.7835 0.118 0.7939 0.115 0.8043 0.1121 0.8148 0.1093 0.8254 0.1066 0.8360 0.104 ...

3 days ago | 0

Answered

How do I generate missing entries using random binary masks on an Image?

Try this: https://in.mathworks.com/matlabcentral/fileexchange/4551-inpaint_nans

How do I generate missing entries using random binary masks on an Image?

Try this: https://in.mathworks.com/matlabcentral/fileexchange/4551-inpaint_nans

3 days ago | 0

| accepted

Answered

Averaging every element with nearby elements

Read about knnsearch. With this you can get your desired number of nearest neighbors indices.....with the indices you can get yo...

Averaging every element with nearby elements

Read about knnsearch. With this you can get your desired number of nearest neighbors indices.....with the indices you can get yo...

3 days ago | 0

Answered

create a matrix with numbers from vector

N = zeros(3,3,3) ; for i = 1:3 N(i,:,i) = 1 ; end M = reshape(N,3,[])

create a matrix with numbers from vector

N = zeros(3,3,3) ; for i = 1:3 N(i,:,i) = 1 ; end M = reshape(N,3,[])

3 days ago | 0

Answered

How can I remove the region outside of the vector data when I combine the vector and raster data on the same map?

You must be having the boundary coordinates in hand........use inpolygon and get the points lying inside the closed region. Read...

How can I remove the region outside of the vector data when I combine the vector and raster data on the same map?

You must be having the boundary coordinates in hand........use inpolygon and get the points lying inside the closed region. Read...

3 days ago | 0

Answered

How do I form a product of two arrays and add the numerical value of the integral in the plot?

xData = linspace(0,4*pi,1024); yDataA = cos(xData); yDataB = cos(xData); p = yDataA.*yDataB ; plot(xData,p)

How do I form a product of two arrays and add the numerical value of the integral in the plot?

xData = linspace(0,4*pi,1024); yDataA = cos(xData); yDataB = cos(xData); p = yDataA.*yDataB ; plot(xData,p)

3 days ago | 0

| accepted

Answered

How to convert GPS data (lon,lat) data into X, Y (meters)

You can convert (lat,lon) which are in degrees to kms using deg2km. If you want to convert degrees to utms you may have a look...

How to convert GPS data (lon,lat) data into X, Y (meters)

You can convert (lat,lon) which are in degrees to kms using deg2km. If you want to convert degrees to utms you may have a look...

4 days ago | 0

Answered

Extracting specific portions of acceleromeetr signal

load('accx.mat') ; tol = 0.1 ; % can be varied idx = abs(accx)>tol ; plot(accx(idx))

Extracting specific portions of acceleromeetr signal

load('accx.mat') ; tol = 0.1 ; % can be varied idx = abs(accx)>tol ; plot(accx(idx))

4 days ago | 1

| accepted

Answered

2x/5-x/6=7/10

YOu can do simple hand calculation......or else you may use syms and solve syms x eqn=10*x/5-2*x/6-7/10==0 ; sol = solve(e...

2x/5-x/6=7/10

YOu can do simple hand calculation......or else you may use syms and solve syms x eqn=10*x/5-2*x/6-7/10==0 ; sol = solve(e...

4 days ago | 0

Answered

How can I rearrange data in txt file to Matlab?

fid = fopen('data.txt','rt') ; S = textscan(fid,'%s','delimiter','\n') ; S = S{1} ; fclose(fid) ; idx = contains(S,'7c:95...

How can I rearrange data in txt file to Matlab?

fid = fopen('data.txt','rt') ; S = textscan(fid,'%s','delimiter','\n') ; S = S{1} ; fclose(fid) ; idx = contains(S,'7c:95...

4 days ago | 0

Answered

Want to plot a table that has both text and numbers into a pie chart

T = [{'Alabama' } {[ 227433]} {'Alaska' } {[ 12107]} {'Arizona' ...

Want to plot a table that has both text and numbers into a pie chart

T = [{'Alabama' } {[ 227433]} {'Alaska' } {[ 12107]} {'Arizona' ...

4 days ago | 1

| accepted

Answered

Matrix Operations using MATLAB

Read about eig https://in.mathworks.com/help/matlab/ref/eig.html A = magic(6) ; [v,d] = eig(A) ;

Matrix Operations using MATLAB

Read about eig https://in.mathworks.com/help/matlab/ref/eig.html A = magic(6) ; [v,d] = eig(A) ;

4 days ago | 0

| accepted

Answered

vectore with two colors

A = rand(3,1) ; B = rand(3,1) ; x1 = 1:length(A) ; x2 = (1:length(B))+length(A) ; figure hold on stem(x1,A,'r') stem(x2...

vectore with two colors

A = rand(3,1) ; B = rand(3,1) ; x1 = 1:length(A) ; x2 = (1:length(B))+length(A) ; figure hold on stem(x1,A,'r') stem(x2...

4 days ago | 0

| accepted

Answered

How to remove data on left hand region of the image?

Use pcolor. Plot the color bar......See the limits and values.......which ever values you don't want replace them with NaN or re...

How to remove data on left hand region of the image?

Use pcolor. Plot the color bar......See the limits and values.......which ever values you don't want replace them with NaN or re...

5 days ago | 0

| accepted

Answered

Plotting elements of a matrix in one vertical line for every iteration

YOu can specify a random colour using rand(1,3)

Plotting elements of a matrix in one vertical line for every iteration

YOu can specify a random colour using rand(1,3)

5 days ago | 0