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

Professional Interests: Mathematical Computing

Answered

Why the for-loop doesn't work here?

You save all the values into an array and plot after the for-loop. %% ------------------------------Program-------------------...

Why the for-loop doesn't work here?

You save all the values into an array and plot after the for-loop. %% ------------------------------Program-------------------...

20 minutes ago | 0

Answered

Storage elements from matrix in other one, with indexing.

A = [8 3 0 2 9 6 1 4 10 6 2 1 1 6 2 8 ]; a=2; b=4; [X,Y] = meshgrid([a b],[a b]) ; id = sub2ind(size(A)...

Storage elements from matrix in other one, with indexing.

A = [8 3 0 2 9 6 1 4 10 6 2 1 1 6 2 8 ]; a=2; b=4; [X,Y] = meshgrid([a b],[a b]) ; id = sub2ind(size(A)...

16 hours ago | 1

| accepted

Answered

How to merge x and y values to a (x,y) format?

As the dimensions of xi_total and yi_total remain same i.e. 201*1 in the entire loop of length 1:sample; you can save the data i...

How to merge x and y values to a (x,y) format?

As the dimensions of xi_total and yi_total remain same i.e. 201*1 in the entire loop of length 1:sample; you can save the data i...

17 hours ago | 1

Answered

How to plot a Bar Graph without a uniform spacing on the horizontal axis

You can plot the values by index and show the respective values uisng text. Example: x = [5 10 100 1000] ; y = rand(size(x)...

How to plot a Bar Graph without a uniform spacing on the horizontal axis

You can plot the values by index and show the respective values uisng text. Example: x = [5 10 100 1000] ; y = rand(size(x)...

17 hours ago | 0

| accepted

Answered

Input data size does not match network inputs size

Replace the line: net=newff([-1 1], [130,150,1], {'tansig','tansig','purelin'},'traingd'); with: PR = [min(P,[],2) max(P,[],...

Input data size does not match network inputs size

Replace the line: net=newff([-1 1], [130,150,1], {'tansig','tansig','purelin'},'traingd'); with: PR = [min(P,[],2) max(P,[],...

18 hours ago | 1

| accepted

Answered

How to change output in FOR Loop

X = zeros(12,1) ; for k = 1:1:12 X(k) = find(DateVector(:,2) == k)'; end The above is fine enough. You should go by in...

How to change output in FOR Loop

X = zeros(12,1) ; for k = 1:1:12 X(k) = find(DateVector(:,2) == k)'; end The above is fine enough. You should go by in...

18 hours ago | 0

Answered

How to compute weighted average

A = [54 50 ; 40 60 ; 30 70] ; A(:,3) = 0.4*A(:,1)+0.6*A(:,2)

How to compute weighted average

A = [54 50 ; 40 60 ; 30 70] ; A(:,3) = 0.4*A(:,1)+0.6*A(:,2)

19 hours ago | 0

Answered

Preallocating array error problem

You need to initialize the variable before the loop. Initialize using: error_history = zeros([],1) ; Note: Don't show your co...

Preallocating array error problem

You need to initialize the variable before the loop. Initialize using: error_history = zeros([],1) ; Note: Don't show your co...

20 hours ago | 0

| accepted

Answered

How to generate random vector with boundary limit and with fixed sum? Also ensure to same value when called the function with same parameters.

rand creates random number every time. If you fix the seed, then you will get the same random number. Read about rng.

How to generate random vector with boundary limit and with fixed sum? Also ensure to same value when called the function with same parameters.

rand creates random number every time. If you fix the seed, then you will get the same random number. Read about rng.

21 hours ago | 1

Answered

How do I draw the same graph as the picture?

x1 = [4.158236141 6.153599506 -4.535940798 7.598349019 1.546377884 -1.345068203 9.996482015 -0.173832303 -4.963945249 7.60191503...

How do I draw the same graph as the picture?

x1 = [4.158236141 6.153599506 -4.535940798 7.598349019 1.546377884 -1.345068203 9.996482015 -0.173832303 -4.963945249 7.60191503...

21 hours ago | 0

| accepted

Answered

How do you get the value for any point on the response plane?

x1 = [4.158236141 6.153599506 -4.535940798 7.598349019 1.546377884 -1.345068203 9.996482015 -0.173832303 -4.963945249 7.60191503...

How do you get the value for any point on the response plane?

x1 = [4.158236141 6.153599506 -4.535940798 7.598349019 1.546377884 -1.345068203 9.996482015 -0.173832303 -4.963945249 7.60191503...

22 hours ago | 0

| accepted

Answered

how to merge two tables with same column names into one table?

T1 = array2table(rand(4,3), 'VariableNames', {'A', 'B', 'C'}) ; T2 = array2table(rand(4,3), 'VariableNames', {'A', 'B', 'C'}) ;...

how to merge two tables with same column names into one table?

T1 = array2table(rand(4,3), 'VariableNames', {'A', 'B', 'C'}) ; T2 = array2table(rand(4,3), 'VariableNames', {'A', 'B', 'C'}) ;...

23 hours ago | 0

Answered

Changing Data in a Table

Name = {'Al Pacino', 'Angelina Jolie','Robert De Niro','Russel Crowe','Kate Winslet','Julia Roberts'} ; Sex = {'M','F','M','M',...

Changing Data in a Table

Name = {'Al Pacino', 'Angelina Jolie','Robert De Niro','Russel Crowe','Kate Winslet','Julia Roberts'} ; Sex = {'M','F','M','M',...

23 hours ago | 0

Answered

calculate the sum of a discert series and then limit the the result

syms k n f = symsum(1/(k+n),k,1,n) s = limit(f,n,inf)

calculate the sum of a discert series and then limit the the result

syms k n f = symsum(1/(k+n),k,1,n) s = limit(f,n,inf)

23 hours ago | 0

| accepted

Answered

How to create an animation between 2 points

A = [0 0] ; B = [5 4] ; x = [A(1) B(1)] ; y = [A(2) B(2)] ; p = polyfit(x,y,1) ; xi = linspace(x(1),x(2)) ; y...

How to create an animation between 2 points

A = [0 0] ; B = [5 4] ; x = [A(1) B(1)] ; y = [A(2) B(2)] ; p = polyfit(x,y,1) ; xi = linspace(x(1),x(2)) ; y...

1 day ago | 0

| accepted

Answered

Help with plotting an image on 3D

Try image instead of surf. If you use surf, try reversing the y-axis direction.

Help with plotting an image on 3D

Try image instead of surf. If you use surf, try reversing the y-axis direction.

4 days ago | 0

Answered

is there a matlab visualiser

Read about debugging a code here: https://in.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html

is there a matlab visualiser

Read about debugging a code here: https://in.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html

4 days ago | 0

Answered

What does xlim() do in my code and why are its brackets empty?

xlim() The above takes the x-values based on the plot/ the input x you give. It will draw a line along x-axes in the range as t...

What does xlim() do in my code and why are its brackets empty?

xlim() The above takes the x-values based on the plot/ the input x you give. It will draw a line along x-axes in the range as t...

4 days ago | 0

| accepted

Answered

Which function should I use to fill an ouput matrix based on information in two other matrices

Index = [1 2 1; 5 4 4]; Data = [12 16 10; 13 16 18; 12 11 14; 18 19 22; 23 60 17] ; Output = [12 13 12; 60 19 19] ; iwant = ...

Which function should I use to fill an ouput matrix based on information in two other matrices

Index = [1 2 1; 5 4 4]; Data = [12 16 10; 13 16 18; 12 11 14; 18 19 22; 23 60 17] ; Output = [12 13 12; 60 19 19] ; iwant = ...

4 days ago | 0

| accepted

Answered

Interpolating to latitude, longitude and time

Read about interp1 and interp2.

Interpolating to latitude, longitude and time

Read about interp1 and interp2.

4 days ago | 0

| accepted

Answered

Check if point lies inside error ellipse

REad about inpolygon. This will tell you whether given set of points lies inside the given closed polygon.

Check if point lies inside error ellipse

REad about inpolygon. This will tell you whether given set of points lies inside the given closed polygon.

4 days ago | 0

| accepted

Answered

Continuous Wavelet 2D Plot Help.

Let A be your data matrix. %% Structured grid x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; nx = length(unique(x)) ; ny =...

Continuous Wavelet 2D Plot Help.

Let A be your data matrix. %% Structured grid x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; nx = length(unique(x)) ; ny =...

4 days ago | 0

Answered

How to do spatial correlation

As the data B is at a location......Pick the same location data from the grid 20x25 and then find the corelation. Read about plo...

How to do spatial correlation

As the data B is at a location......Pick the same location data from the grid 20x25 and then find the corelation. Read about plo...

4 days ago | 0

Answered

How to split 1 matrix into 3 parts

m = 9; % number of rows (should be multiple of 3) n = 10 ; % number of columns p = 3 ; % three parts wanted % Range of ...

How to split 1 matrix into 3 parts

m = 9; % number of rows (should be multiple of 3) n = 10 ; % number of columns p = 3 ; % three parts wanted % Range of ...

4 days ago | 1

| accepted

Answered

Delete NaN in arrays in a cell

Let C be your cell array; iwant = C ; for i = 1:length(C) idx = isnan(C{i}) ; iwant{i} = C{i}(~idx) ; end

Delete NaN in arrays in a cell

Let C be your cell array; iwant = C ; for i = 1:length(C) idx = isnan(C{i}) ; iwant{i} = C{i}(~idx) ; end

5 days ago | 1

| accepted

Answered

turn a sentence into matrix of words

str = 'I Love MATLAB' ; iwant = strsplit(str)

turn a sentence into matrix of words

str = 'I Love MATLAB' ; iwant = strsplit(str)

5 days ago | 0

Answered

MATLAB: Index exceeds the number of array elements (1)

You are trying to extract more number of elements then present in the array. Example: A = rand(1,3) ; A(1) % no error A...

MATLAB: Index exceeds the number of array elements (1)

You are trying to extract more number of elements then present in the array. Example: A = rand(1,3) ; A(1) % no error A...

5 days ago | 0

Answered

Concatenate 3-D matrix in a for loop

A = rand(2,3,4) ; B = rand(2,3,4) ; C = cat(1,A,B)

Concatenate 3-D matrix in a for loop

A = rand(2,3,4) ; B = rand(2,3,4) ; C = cat(1,A,B)

5 days ago | 0

Answered

How to replace elements in a table using loops or any other method ?

C1 = {'Y' 'Y' 'N' 'Y' 'N'}' ; C2 = rand(size(C1)) ; T = table(C1,C2) ; % replace Y a 1 and N as 0 C = zeros(size(C1)) ; ...

How to replace elements in a table using loops or any other method ?

C1 = {'Y' 'Y' 'N' 'Y' 'N'}' ; C2 = rand(size(C1)) ; T = table(C1,C2) ; % replace Y a 1 and N as 0 C = zeros(size(C1)) ; ...

5 days ago | 0