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

Professional Interests: Mathematical Computing

Answered

How can I shade or hatch regions bounded by contour lines, to distinguish feasibility zones from constraint zones in a contour plot?

You can use some file exchange functions. https://in.mathworks.com/matlabcentral/fileexchange/2075-hatch-m Also you can fill...

How can I shade or hatch regions bounded by contour lines, to distinguish feasibility zones from constraint zones in a contour plot?

You can use some file exchange functions. https://in.mathworks.com/matlabcentral/fileexchange/2075-hatch-m Also you can fill...

3 hours ago | 0

Answered

how do I fix this code

You should not run the function by hitting the run button...you should define the input variables and then call the function. ...

how do I fix this code

You should not run the function by hitting the run button...you should define the input variables and then call the function. ...

8 hours ago | 0

Answered

Error using plot3 Vectors must be the same length.

Read about element by element operations. t = linspace(-100*pi, 100*pi); %define the range you are plotting over x = (t-2)....

Error using plot3 Vectors must be the same length.

Read about element by element operations. t = linspace(-100*pi, 100*pi); %define the range you are plotting over x = (t-2)....

9 hours ago | 0

Answered

How to animate a cosine plot using getframe

t=0:pi/100:10; tlength = numel(t); for i=1:tlength plot(cos(1:t(i))); F(:,i) = getframe; end movie(F); Also read...

How to animate a cosine plot using getframe

t=0:pi/100:10; tlength = numel(t); for i=1:tlength plot(cos(1:t(i))); F(:,i) = getframe; end movie(F); Also read...

9 hours ago | 1

| accepted

Answered

how to color the world with two color(red and green)?

Refer this link: https://in.mathworks.com/matlabcentral/answers/598378-how-to-plot-coast-and-fill-the-land-with-gray-without-m_m...

how to color the world with two color(red and green)?

Refer this link: https://in.mathworks.com/matlabcentral/answers/598378-how-to-plot-coast-and-fill-the-land-with-gray-without-m_m...

9 hours ago | 0

Answered

Finding the indices of the maximum of a matrix for plotting

load('x.mat') load('y.mat') load('m.mat') [X,Y] = meshgrid(x,y) ; Z = m ; % Make Z equal to size of X, Y Z(1,:) = []; ...

Finding the indices of the maximum of a matrix for plotting

load('x.mat') load('y.mat') load('m.mat') [X,Y] = meshgrid(x,y) ; Z = m ; % Make Z equal to size of X, Y Z(1,:) = []; ...

20 hours ago | 1

| accepted

Answered

convert 262144x1 into 1x262144.

If A is your array..just transpose it. iwant = A' Read about transpose.

convert 262144x1 into 1x262144.

If A is your array..just transpose it. iwant = A' Read about transpose.

1 day ago | 0

| accepted

Answered

Surf(x, y, z) with a colormap that is only two colours

You can try something like this x = linspace(-20,20,2400); fz = exp(-x.^2./0.2).*cos(5.*x); [X, Y] = meshgrid(x, x); z = exp...

Surf(x, y, z) with a colormap that is only two colours

You can try something like this x = linspace(-20,20,2400); fz = exp(-x.^2./0.2).*cos(5.*x); [X, Y] = meshgrid(x, x); z = exp...

1 day ago | 0

Answered

I keep getting input error

You have to use Ohm's law instead of the unknown variable current. Use fprintf instead disp. %r is r1 33 r2 47 = 80 % xl1 i...

I keep getting input error

You have to use Ohm's law instead of the unknown variable current. Use fprintf instead disp. %r is r1 33 r2 47 = 80 % xl1 i...

2 days ago | 0

Answered

How to add an extra for loop

newTime = cell(1,4); % cell because, we are not sure of dimensions in each case R = [7 11 ; 56 59 ; 99 106 ; 133 143 ] ; % ...

How to add an extra for loop

newTime = cell(1,4); % cell because, we are not sure of dimensions in each case R = [7 11 ; 56 59 ; 99 106 ; 133 143 ] ; % ...

2 days ago | 0

| accepted

Answered

Tidal Harmonic analysis, by finding the amplitude and the phase of each tidal component

Refer these file exchange packages. https://www.eoas.ubc.ca/~rich/ https://in.mathworks.com/matlabcentral/fileexchange/46523...

Tidal Harmonic analysis, by finding the amplitude and the phase of each tidal component

Refer these file exchange packages. https://www.eoas.ubc.ca/~rich/ https://in.mathworks.com/matlabcentral/fileexchange/46523...

2 days ago | 0

| accepted

Answered

convert 128x2 char to 1x64 char

If val is your char array..you can try something like: iwant = strcat(val(1:2:end),val(2:2:end))

convert 128x2 char to 1x64 char

If val is your char array..you can try something like: iwant = strcat(val(1:2:end),val(2:2:end))

2 days ago | 0

| accepted

Answered

how sum all element which are the right of diagonal. where row=colom .....i have done this much but confuse in further operation

Read about triu. https://in.mathworks.com/help/matlab/ref/triu.html If A is your matrix, use: iwant = sum(sum(triu(A)))

how sum all element which are the right of diagonal. where row=colom .....i have done this much but confuse in further operation

Read about triu. https://in.mathworks.com/help/matlab/ref/triu.html If A is your matrix, use: iwant = sum(sum(triu(A)))

2 days ago | 0

Answered

Plotting coordinate points using plot()

rng (7) n = 30; center = [0 0]; radius = 1; eps = 0.1; r = eps*rand(n,1) + radius -eps/2; A = [center(1) + r.*cos(2*pi*(1:...

Plotting coordinate points using plot()

rng (7) n = 30; center = [0 0]; radius = 1; eps = 0.1; r = eps*rand(n,1) + radius -eps/2; A = [center(1) + r.*cos(2*pi*(1:...

2 days ago | 0

Answered

Unable to perform assignment because the size of the left side is 1-by-7056 and the size of the right side is 1-by-213444

The error is clear..you have initiliazed a array with smaller dimension and you are trying to save more elements in the array. ...

Unable to perform assignment because the size of the left side is 1-by-7056 and the size of the right side is 1-by-213444

The error is clear..you have initiliazed a array with smaller dimension and you are trying to save more elements in the array. ...

2 days ago | 0

| accepted

Answered

How to make a list of appearance

Let str be your list of animals. xbins = unique(str); [counts,centres] = hist(str,xbins); R = [centres counts']

How to make a list of appearance

Let str be your list of animals. xbins = unique(str); [counts,centres] = hist(str,xbins); R = [centres counts']

3 days ago | 0

Answered

How to add all the curves in a single figure?

figure(4) hold on plot(Out(:,1),time); plot(Out(:,10),time); plot(Out(:,20),time); set(gca, 'ydir', 'reverse'); xlabel('Rp...

How to add all the curves in a single figure?

figure(4) hold on plot(Out(:,1),time); plot(Out(:,10),time); plot(Out(:,20),time); set(gca, 'ydir', 'reverse'); xlabel('Rp...

3 days ago | 0

| accepted

Answered

Implementation of formula in a single line.

x = linspace(-4,+4,100) ; z = x ; L = 2 ; A = 1.6732; z(x<0) = L*A*exp(x(x<0)-1) ; plot(x,z)

Implementation of formula in a single line.

x = linspace(-4,+4,100) ; z = x ; L = 2 ; A = 1.6732; z(x<0) = L*A*exp(x(x<0)-1) ; plot(x,z)

3 days ago | 0

Answered

3d plot with different length of x and y

surf, pcolor is your function. You can plot using that. x = 1:21 ; y = 1:101 ; Z = rand(21,101) ; [X,Y] = meshgrid(x,y...

3d plot with different length of x and y

surf, pcolor is your function. You can plot using that. x = 1:21 ; y = 1:101 ; Z = rand(21,101) ; [X,Y] = meshgrid(x,y...

3 days ago | 0

Answered

How to connect two displays?

clc;clear C1 = input('Please enter a code to break: ' , 's'); if length(C1) ~= 6 disp('Decoy message: Not a six-digit num...

How to connect two displays?

clc;clear C1 = input('Please enter a code to break: ' , 's'); if length(C1) ~= 6 disp('Decoy message: Not a six-digit num...

3 days ago | 0

| accepted

Answered

Increment change For loop

val = [1:2:19,23:4:200] ; N = length(val) ; iwant = zeros(1,N) ; for i = 1:N iwant(i) = val(i) % In case you want to...

Increment change For loop

val = [1:2:19,23:4:200] ; N = length(val) ; iwant = zeros(1,N) ; for i = 1:N iwant(i) = val(i) % In case you want to...

4 days ago | 1

Answered

Possible to contour at specific z planes to give the x,y coords?

You can use contour to do this. You need to specify the level as 0 to get your coordinates (x,y) where Z = 0. C = contour(X,Y,...

Possible to contour at specific z planes to give the x,y coords?

You can use contour to do this. You need to specify the level as 0 to get your coordinates (x,y) where Z = 0. C = contour(X,Y,...

4 days ago | 0

Answered

How to draw a position vector on a 3D plot

You can use the file exchange: https://in.mathworks.com/matlabcentral/fileexchange/278-arrow You can also use annotation h=a...

How to draw a position vector on a 3D plot

You can use the file exchange: https://in.mathworks.com/matlabcentral/fileexchange/278-arrow You can also use annotation h=a...

4 days ago | 0

| accepted

Answered

How can I display the sum of the digits of a number entered by a user?

n = 3434; digits = dec2base(N,10) - '0' ; iwant = sum(digits)

How can I display the sum of the digits of a number entered by a user?

n = 3434; digits = dec2base(N,10) - '0' ; iwant = sum(digits)

5 days ago | 0

Answered

convert a 3D matrix to a 2D matrix

iwant = X2 ; iwant(1:2:end,:) = X2(1:3,:) ; iwant(2:2:end,:) = X2(4:end,:) ;

convert a 3D matrix to a 2D matrix

iwant = X2 ; iwant(1:2:end,:) = X2(1:3,:) ; iwant(2:2:end,:) = X2(4:end,:) ;

5 days ago | 0

Answered

Reshape a multidimensional matrix

iwant = reshape(144,[]) ; Wont this work for you?

Reshape a multidimensional matrix

iwant = reshape(144,[]) ; Wont this work for you?

5 days ago | 0

Answered

How to plot coast and fill the land with gray without m_map

To fill the land use patch/ area/ fill. Read about those functions. To simply plot the coastline use plot.

How to plot coast and fill the land with gray without m_map

To fill the land use patch/ area/ fill. Read about those functions. To simply plot the coastline use plot.

5 days ago | 0

| accepted

Answered

error using cross (A and B must have at least one dimension of length 3.)

https://in.mathworks.com/matlabcentral/fileexchange/55021-n-dimensional-cross-product

error using cross (A and B must have at least one dimension of length 3.)

https://in.mathworks.com/matlabcentral/fileexchange/55021-n-dimensional-cross-product

5 days ago | 0