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

Professional Interests: Mathematical Computing

Answered

solve non linear equations

Replace the first line: lear all with clear all Also terminate the output of each line using ;

solve non linear equations

Replace the first line: lear all with clear all Also terminate the output of each line using ;

7 hours ago | 0

Answered

Concatenate arrays in MATLAB and Change Column name of Table

t = [10 20 30; 40 50 60]; A = t(:,1) ; B = t(:,2) ; C = t(:,3) ; T = table(A,B,C)

Concatenate arrays in MATLAB and Change Column name of Table

t = [10 20 30; 40 50 60]; A = t(:,1) ; B = t(:,2) ; C = t(:,3) ; T = table(A,B,C)

8 hours ago | 0

Answered

Function problem in loop

function out=fns1(X) x1=X(:,1); x2=X(:,2); x3=X(:,3); x4=X(:,4); x5=X(:,5); x6=X(:,6); x7=X(:,7); x8=X(:,8); x9=X(:,9);...

Function problem in loop

function out=fns1(X) x1=X(:,1); x2=X(:,2); x3=X(:,3); x4=X(:,4); x5=X(:,5); x6=X(:,6); x7=X(:,7); x8=X(:,8); x9=X(:,9);...

8 hours ago | 1

Answered

How to set Reallyl Basic iterative sum

% f = n*sin(n*x) ; thesum = 0 ; for n = 1:10 thesum = thesum+n*sin(n*x); end

How to set Reallyl Basic iterative sum

% f = n*sin(n*x) ; thesum = 0 ; for n = 1:10 thesum = thesum+n*sin(n*x); end

8 hours ago | 0

Answered

How to make a file size smaller when export as a netcdf?

Convert the variables to single and then write to nc file. Read about Single.

How to make a file size smaller when export as a netcdf?

Convert the variables to single and then write to nc file. Read about Single.

9 hours ago | 0

Answered

Contour plot for the external data

simData = importdata('eField_sample.txt'); % import data x_val = simData.data(:,1); % x-coordinate y_val = simData.data(:,2); ...

Contour plot for the external data

simData = importdata('eField_sample.txt'); % import data x_val = simData.data(:,1); % x-coordinate y_val = simData.data(:,2); ...

9 hours ago | 0

| accepted

Answered

Create equations in a loop

% K*t = F t = K\F ; Refer more: https://in.mathworks.com/help/matlab/ref/mldivide.html

Create equations in a loop

% K*t = F t = K\F ; Refer more: https://in.mathworks.com/help/matlab/ref/mldivide.html

11 hours ago | 1

Answered

Correlation of rows of matrix B with rows of reference matrix A

[r,c]=size(matA); x = zeros(length(r),1) ; for i=1:r x(i) = corr(matA(i,:)',matB(i,:)') ; end [val,idx] = max(x)

Correlation of rows of matrix B with rows of reference matrix A

[r,c]=size(matA); x = zeros(length(r),1) ; for i=1:r x(i) = corr(matA(i,:)',matB(i,:)') ; end [val,idx] = max(x)

12 hours ago | 0

Answered

Hello everyone, I would like to ask a question. How to plot only the (-pi:+pi) range of the following curve.

load jizuobiao2.mat THETA12 = linspace(-pi,+pi,length(RHO12)) ; f2 = fit(THETA12,RHO12,'smoothingspline','SmoothingParam',0.99...

Hello everyone, I would like to ask a question. How to plot only the (-pi:+pi) range of the following curve.

load jizuobiao2.mat THETA12 = linspace(-pi,+pi,length(RHO12)) ; f2 = fit(THETA12,RHO12,'smoothingspline','SmoothingParam',0.99...

1 day ago | 0

| accepted

Answered

Calculate the Gradient of a given function using the forward and central quotients.

function f1x = vordiff(f,x,h,y,z) %Vorwärtsdifferenzenquotienten syms x y z ; f = (4*x+3*y+2*z)*e^(-3*x^2)-4*y^2-8*x*y-2*z^2 ...

Calculate the Gradient of a given function using the forward and central quotients.

function f1x = vordiff(f,x,h,y,z) %Vorwärtsdifferenzenquotienten syms x y z ; f = (4*x+3*y+2*z)*e^(-3*x^2)-4*y^2-8*x*y-2*z^2 ...

2 days ago | 0

Answered

How to select a range of data in matrix

Let A be your column matrix. idx = A <= 44.1 ; % get indices using logical indexing iwant = A(idx) ; % Extract those elemen...

How to select a range of data in matrix

Let A be your column matrix. idx = A <= 44.1 ; % get indices using logical indexing iwant = A(idx) ; % Extract those elemen...

3 days ago | 1

Answered

Loop for contour a 3 inputs function

x = linspace(-1,1) ; y = linspace(-1,1) ; z = linspace(-1,1) ; [x,y,z] = meshgrid(x,y,z) ; s = x.^2+2*x.*y.*z+y.^3+y.^...

Loop for contour a 3 inputs function

x = linspace(-1,1) ; y = linspace(-1,1) ; z = linspace(-1,1) ; [x,y,z] = meshgrid(x,y,z) ; s = x.^2+2*x.*y.*z+y.^3+y.^...

3 days ago | 1

Answered

How can i use symbolic variables which were created as a vector?

What you have shown will not work and it is meaning less. You have to use: x = [1 2 3 4 5 6 7 8 9]; Where veer you have x1, x...

How can i use symbolic variables which were created as a vector?

What you have shown will not work and it is meaning less. You have to use: x = [1 2 3 4 5 6 7 8 9]; Where veer you have x1, x...

3 days ago | 0

Answered

How can I plot 4-dimensional plot?

Have a look on slice. T = readtable('Book1.xlsx') ; l1 = T.l1 ; l2 = T.l2 ; l3 = T.l3 ; Lz = T.Lz ; nx = length(un...

How can I plot 4-dimensional plot?

Have a look on slice. T = readtable('Book1.xlsx') ; l1 = T.l1 ; l2 = T.l2 ; l3 = T.l3 ; Lz = T.Lz ; nx = length(un...

3 days ago | 0

Answered

I have .mat file containing lat, lon, depth data as double variables. How can I generate cross-sections across different lines from its mesh 3D plot?

Read about slice. https://in.mathworks.com/help/matlab/ref/slice.html

I have .mat file containing lat, lon, depth data as double variables. How can I generate cross-sections across different lines from its mesh 3D plot?

Read about slice. https://in.mathworks.com/help/matlab/ref/slice.html

4 days ago | 0

Answered

How to identify biggest location plot of random plotting

You need to sort the distance and pick the required number of points you want, to get the points from A close to BS. n = 50; ...

How to identify biggest location plot of random plotting

You need to sort the distance and pick the required number of points you want, to get the points from A close to BS. n = 50; ...

4 days ago | 0

Answered

How to generate video file from animated plot in Matlab?

It is because, you are writitng only the last frame into video...you need to keep the video writer code into a loop. x = linsp...

How to generate video file from animated plot in Matlab?

It is because, you are writitng only the last frame into video...you need to keep the video writer code into a loop. x = linsp...

4 days ago | 0

| accepted

Answered

Creating a matrix of all possible combinations given multiple vectors

REad about perms and nchoosek.

Creating a matrix of all possible combinations given multiple vectors

REad about perms and nchoosek.

4 days ago | 0

Answered

How can we generate random numbers between two negative values.

a = -5 ; b = -1.670000000000000 ; r = (b-a).*rand(1000,1) + a;

How can we generate random numbers between two negative values.

a = -5 ; b = -1.670000000000000 ; r = (b-a).*rand(1000,1) + a;

4 days ago | 2

| accepted

Answered

Find the under condition min or max of a row vector

a = [ 1 3 5 2 5 7 8 3 6 4 9 ] ; a(a<3) = NaN ; % Replace values <3 to NaN [val,idx] = min(a)

Find the under condition min or max of a row vector

a = [ 1 3 5 2 5 7 8 3 6 4 9 ] ; a(a<3) = NaN ; % Replace values <3 to NaN [val,idx] = min(a)

4 days ago | 0

| accepted

Answered

How to use for loop

user_input = fprintf('%.1f\n', input('Enter a positive real number')); count = 0 ; while count <= 10 if user_input >= 0 ...

How to use for loop

user_input = fprintf('%.1f\n', input('Enter a positive real number')); count = 0 ; while count <= 10 if user_input >= 0 ...

4 days ago | 1

Answered

How to make a color sphere as colorbar in 3D image

[X,Y,Z] = sphere; surf(X,Y,Z) colorbar

How to make a color sphere as colorbar in 3D image

[X,Y,Z] = sphere; surf(X,Y,Z) colorbar

4 days ago | 0

Answered

I am trying to plot x and y with y being the only unknown but I don’t what is wrong in my code please help

Your x is an array Where as theta is only a scalar. You have to make theta and x both arrays of same size. You need to use...

I am trying to plot x and y with y being the only unknown but I don’t what is wrong in my code please help

Your x is an array Where as theta is only a scalar. You have to make theta and x both arrays of same size. You need to use...

4 days ago | 0

Answered

Open specific format file outside MATLAB ?

Right click on the C file...click on the "open with" and the choose "choose default program", after this selct your visula studi...

Open specific format file outside MATLAB ?

Right click on the C file...click on the "open with" and the choose "choose default program", after this selct your visula studi...

4 days ago | 0

Answered

Trim only edge NaN values

X = [NaN, NaN, 2, 5, 1, 6, NaN, 1, NaN, NaN]; A = isnan(X) ; idx = find(A & diff([0 A]) == 1 & diff([A 0]) == 0) ; idx = [...

Trim only edge NaN values

X = [NaN, NaN, 2, 5, 1, 6, NaN, 1, NaN, NaN]; A = isnan(X) ; idx = find(A & diff([0 A]) == 1 & diff([A 0]) == 0) ; idx = [...

5 days ago | 0

| accepted

Answered

Hello everyone, how to write the code to calculate the similarity coefficient of two curves?Another problem is that when fitting a curve, the interval of a curve x is [-3,3], and it will exceed this interval when fitting a curve. I don’t know where t

load jizuobiao1.mat RHO11 = XX1 ; THETA11 = linspace(-pi,+pi,length(RHO11))' ; f1= fit(THETA11,RHO11,'smoothingspline','Smo...

Hello everyone, how to write the code to calculate the similarity coefficient of two curves?Another problem is that when fitting a curve, the interval of a curve x is [-3,3], and it will exceed this interval when fitting a curve. I don’t know where t

load jizuobiao1.mat RHO11 = XX1 ; THETA11 = linspace(-pi,+pi,length(RHO11))' ; f1= fit(THETA11,RHO11,'smoothingspline','Smo...

5 days ago | 0

Answered

Abaqus input file edit as required by user

Refer this: https://in.mathworks.com/matlabcentral/answers/307258-extract-nodes-and-elements-from-abaqus-input-file-to-matlab ...

Abaqus input file edit as required by user

Refer this: https://in.mathworks.com/matlabcentral/answers/307258-extract-nodes-and-elements-from-abaqus-input-file-to-matlab ...

6 days ago | 0

Answered

Get all unique combinations from cell array for use as functional arguments

A 2*2 matrix means there are four elements i.e. four global indices. idx = 1:4 ; c = nchoosek(idx,2) C has the possible comb...

Get all unique combinations from cell array for use as functional arguments

A 2*2 matrix means there are four elements i.e. four global indices. idx = 1:4 ; c = nchoosek(idx,2) C has the possible comb...

7 days ago | 0

| accepted