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

Professional Interests: Mathematical Computing

Answered

how to add 2 legends for 2 portions of one plot?

th = 0:pi/100:2*pi ; y = sin(th) ; plot(th,y) % set 1 th1 = th(th<=pi) ; y1 = y(th<=pi) ; % set 2 th2 = th(th>pi) ; ...

how to add 2 legends for 2 portions of one plot?

th = 0:pi/100:2*pi ; y = sin(th) ; plot(th,y) % set 1 th1 = th(th<=pi) ; y1 = y(th<=pi) ; % set 2 th2 = th(th>pi) ; ...

1 giorno ago | 0

Answered

how to store data in a matrix?

U10 = ncread(filename,'U10M'); If your variable U10M is 3D, the above line reads complete data. Your U10 should be 3D....

how to store data in a matrix?

U10 = ncread(filename,'U10M'); If your variable U10M is 3D, the above line reads complete data. Your U10 should be 3D....

1 giorno ago | 0

| accepted

Answered

How to modify text file

fid = fopen('data.txt') ; S = textscan(fid,'%s') ; fclose(fid) ; S = S{1} ; % Find the string you want to change idx =...

How to modify text file

fid = fopen('data.txt') ; S = textscan(fid,'%s') ; fclose(fid) ; S = S{1} ; % Find the string you want to change idx =...

1 giorno ago | 0

Answered

Import of a 2D mesh created by Mesh2D or NodeLab into PDE Toolbox

You need to proved the mesh in .stl format. Write the required data into .stl file using: https://in.mathworks.com/matlabcentral...

Import of a 2D mesh created by Mesh2D or NodeLab into PDE Toolbox

You need to proved the mesh in .stl format. Write the required data into .stl file using: https://in.mathworks.com/matlabcentral...

2 giorni ago | 0

Answered

Marker points are not fully visible

plot(x,y,'ok','MarkerSize',12,'MarkerFaceColor','k');hold on plot(x1,y1,'LineWidth',2); hold off a = datenum(x1); datetick('...

Marker points are not fully visible

plot(x,y,'ok','MarkerSize',12,'MarkerFaceColor','k');hold on plot(x1,y1,'LineWidth',2); hold off a = datenum(x1); datetick('...

2 giorni ago | 0

Answered

Linear Regression - how to incorporate in figure

Read about plotregression x=[1 2 5 9 4 10 11 2 6] ; y=[5 3 6 8 5 12 14 4 8] ; plotregression(x,y);

Linear Regression - how to incorporate in figure

Read about plotregression x=[1 2 5 9 4 10 11 2 6] ; y=[5 3 6 8 5 12 14 4 8] ; plotregression(x,y);

2 giorni ago | 0

Answered

Write Data to Excel

x = rand(3,1) ; y = rand(3,1) ; z = rand(3,1) ; T = table(x,y,z) ; writetable(T,'test.xlsx')

Write Data to Excel

x = rand(3,1) ; y = rand(3,1) ; z = rand(3,1) ; T = table(x,y,z) ; writetable(T,'test.xlsx')

2 giorni ago | 0

Answered

How do I put elements from one matrix into separate matrices using a loop?

You can use functions like ismember. You can also use logical indexing. The best would be ismember. Read about the function.

How do I put elements from one matrix into separate matrices using a loop?

You can use functions like ismember. You can also use logical indexing. The best would be ismember. Read about the function.

2 giorni ago | 0

Answered

how to divide a 3D figure in matlab in to cubes and getting the cubes's addresses

How about using this function? https://in.mathworks.com/matlabcentral/fileexchange/15161-plotcube You can draw cubes by provid...

how to divide a 3D figure in matlab in to cubes and getting the cubes's addresses

How about using this function? https://in.mathworks.com/matlabcentral/fileexchange/15161-plotcube You can draw cubes by provid...

2 giorni ago | 0

Answered

Intersection between lines and traced shape

The best you can use is: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=funct...

Intersection between lines and traced shape

The best you can use is: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138&tab=funct...

2 giorni ago | 0

Answered

Getting image dimensions into a table

%% Get the dimensions of the image Namelist = cell(length(filelist), 1); N = length(filelist) ; S = zeros(N,3) ; for i = 1...

Getting image dimensions into a table

%% Get the dimensions of the image Namelist = cell(length(filelist), 1); N = length(filelist) ; S = zeros(N,3) ; for i = 1...

2 giorni ago | 0

| accepted

Answered

Read images in four different folders

This is asked multiple times int he forum and it has ben answered lot of times. Refer this one for example: https://in.mathwor...

Read images in four different folders

This is asked multiple times int he forum and it has ben answered lot of times. Refer this one for example: https://in.mathwor...

2 giorni ago | 0

Answered

How to change contour level in different range?

[X,Y,Z] = peaks(100) ; figure hold on contour(X,Y,Z,'LevelList',-6:0.2:4) % levels with difference 0.2 for till 4 contour(...

How to change contour level in different range?

[X,Y,Z] = peaks(100) ; figure hold on contour(X,Y,Z,'LevelList',-6:0.2:4) % levels with difference 0.2 for till 4 contour(...

3 giorni ago | 1

| accepted

Answered

why i get an error ?

Z=uint8(254*((L-mm)/oo))+1; Y = uint8(Y) ; SS=mod((Y+Z),256) Note that same class varibales only can be added. A integer sho...

why i get an error ?

Z=uint8(254*((L-mm)/oo))+1; Y = uint8(Y) ; SS=mod((Y+Z),256) Note that same class varibales only can be added. A integer sho...

3 giorni ago | 0

Answered

How do I get the area of this problem?

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/33543-monte-carlo-method?focused=5201749&tab=function

How do I get the area of this problem?

Refer this: https://in.mathworks.com/matlabcentral/fileexchange/33543-monte-carlo-method?focused=5201749&tab=function

3 giorni ago | 1

Answered

How to convert netcdf to tiff

Refer this for the same question: https://in.mathworks.com/matlabcentral/answers/353583-netcdf-into-geotiff-tiff-file-conversion...

How to convert netcdf to tiff

Refer this for the same question: https://in.mathworks.com/matlabcentral/answers/353583-netcdf-into-geotiff-tiff-file-conversion...

3 giorni ago | 0

Answered

Smooth curves how to

x=[1 2 3]; y=[1.22 3.31 1.91]; xx = min(x):0.1:max(x); yy = spline(x,y,xx); plot(x,y,'r',xx,yy,'b')

Smooth curves how to

x=[1 2 3]; y=[1.22 3.31 1.91]; xx = min(x):0.1:max(x); yy = spline(x,y,xx); plot(x,y,'r',xx,yy,'b')

3 giorni ago | 0

| accepted

Answered

Orthogonal Distance Regression plot and regression equation

Refer this: https://stackoverflow.com/questions/12250422/orthogonal-distance-regression-in-matlab

Orthogonal Distance Regression plot and regression equation

Refer this: https://stackoverflow.com/questions/12250422/orthogonal-distance-regression-in-matlab

3 giorni ago | 0

| accepted

Answered

image processing, k nearest neighbor

This is how you can use knnsearch. a=imread('coins.png'); b=im2bw(a); c=zeros(size(b)); [ptx,pty] = ginput(1); newdata=[pt...

image processing, k nearest neighbor

This is how you can use knnsearch. a=imread('coins.png'); b=im2bw(a); c=zeros(size(b)); [ptx,pty] = ginput(1); newdata=[pt...

6 giorni ago | 0

Answered

Check for the length of the matrix

A = rand(3) ; B = zeros(5) ; [nx,ny] =size(A); B(1:nx,1:ny) = A ; Also read about padarrays

Check for the length of the matrix

A = rand(3) ; B = zeros(5) ; [nx,ny] =size(A); B(1:nx,1:ny) = A ; Also read about padarrays

6 giorni ago | 0

Answered

If loop not executed in a function

Use strcmp instead of equating. function[A0,A1,A2,A3,A4,A5]=Trial_types(ship_type,x) if strcmp(ship_type,'Passenger ship')...

If loop not executed in a function

Use strcmp instead of equating. function[A0,A1,A2,A3,A4,A5]=Trial_types(ship_type,x) if strcmp(ship_type,'Passenger ship')...

6 giorni ago | 2

| accepted

Answered

For loop error: Subscript indices must either be real positive integers or logicals

T_o=[0;0;0]; T_d=[0;0;0]; T_l=[0;0;0]; out_n=zeros([],3); tt=0:0.1:10 ; for i = 1:length(tt) t = tt(i) ; T_o = ...

For loop error: Subscript indices must either be real positive integers or logicals

T_o=[0;0;0]; T_d=[0;0;0]; T_l=[0;0;0]; out_n=zeros([],3); tt=0:0.1:10 ; for i = 1:length(tt) t = tt(i) ; T_o = ...

6 giorni ago | 0

| accepted

Answered

for loop, assign variable

You should initiliaze ed before the loop. for i=1:rows for j=1:columns %calc and store sorted euclidean d...

for loop, assign variable

You should initiliaze ed before the loop. for i=1:rows for j=1:columns %calc and store sorted euclidean d...

6 giorni ago | 1

Answered

write node to cell center

I got the problem..I think you want to do the following. A = xlsread('NODETOSELL.csv') ; % read the file node_vals = A(:...

write node to cell center

I got the problem..I think you want to do the following. A = xlsread('NODETOSELL.csv') ; % read the file node_vals = A(:...

6 giorni ago | 0

Answered

Finding Lines in a Large Text File with a Specific Text

Read about textscan. This function gives you option of running a loop and reading required chunks (lines) of the file. In these ...

Finding Lines in a Large Text File with a Specific Text

Read about textscan. This function gives you option of running a loop and reading required chunks (lines) of the file. In these ...

6 giorni ago | 0

Answered

Keep positive real values from a cell inside a matrix

Let A be your cell. Convert cells into matrix using: A = cell2mat(A) ; Pick the real parts of A using: A = real(A) ; Pic...

Keep positive real values from a cell inside a matrix

Let A be your cell. Convert cells into matrix using: A = cell2mat(A) ; Pick the real parts of A using: A = real(A) ; Pic...

7 giorni ago | 0

Answered

find Nan in cell

Use isempty..not isnan A={[],[],[31],[2,1]}; %first case A1={[],[2],[3],[6]}% second case P=cellfun(@(x) isempty(x),A,'Un...

find Nan in cell

Use isempty..not isnan A={[],[],[31],[2,1]}; %first case A1={[],[2],[3],[6]}% second case P=cellfun(@(x) isempty(x),A,'Un...

7 giorni ago | 1

| accepted

Answered

How do I extract the highest and lowest data from MATLAB figures?

Use max and min.

How do I extract the highest and lowest data from MATLAB figures?

Use max and min.

7 giorni ago | 0