Community Profile

# KSSV

### INCOIS

6 931 total contributions since 2011

Professional Interests: Mathematical Computing

View details...

Contributions in
View by

How to draw 3D plot in matlab with labels?
You can porceed something like this: A = rand(70,6) ; x = 1:70 ; y = ones(size(x)) ; figure hold on for i = 1:6 plot...

environ 17 heures ago | 0

how I can plot 3 independent variables in matlab (4 dimensions)?
m = 10 ; n = 10 ; p =10 ; x = linspace(0,1,m); y = linspace(0,2,n) ; z = linspace(2,3,p) ; [X,Y,Z] = meshgrid(x,y,z) ; f...

environ 20 heures ago | 0

Request to assist:-
A=[1,0,3; 0,5,6; 7,8,9] ; iwant = A(1,3)+A(2,3)

environ 20 heures ago | 0

How to extract the events which have more than 3 consecutive rows
idx3 = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

environ 22 heures ago | 0

How to calculate error between 2 curves ?
If y0 is original value and y1 is obtained value. You can get the error using : dy = y0-y1 ; % error abs_dy = abs(y0-y1) ; ...

2 jours ago | 0

finding eigenvectors matching to eigenvalues
The respective Eigenvalues would be diag(D) v1 = V(:,1) ; e1 = D(1,1) ; v2 = V(:,2) ; e2 = D(2,2) ; % and so on

2 jours ago | 1

| accepted

Point of intersection of two plotted column vectors
This your function.....go for it. https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections?focused=5165138...

3 jours ago | 0

help random numbers generator
a = -0.5 ; b = 0.5 ; N = 10 ; r = (b-a).*randn(N,1) + a;

3 jours ago | 1

Error for exceeding the loop
Why you have made code that complex? It is a simple task. You can use intersect. d = {[5:10] [20:30]}; e = [1 2 7 8 9 11 12 1...

3 jours ago | 0

| accepted

How convert for loop to while loop?
A=zeros(5,8); [r,c]=size(A); %for loop i = 0 ; while i<r % loops over rows i = i+1 ; j = 0 ; while j<c % loops o...

3 jours ago | 1

| accepted

how to pass function as argument ??
Read about anonymous functions. f = @(x) 5*x^3-3*x^2+2*x-2 ; Any value can be evaluated using: f(1) f(2)

3 jours ago | 0

How do I perform Gaussian elimination?
https://in.mathworks.com/matlabcentral/fileexchange/48571-gauss-elimination-method https://gist.github.com/esromneb/1d57b1d16...

3 jours ago | 0

| accepted

How can I check if a point (x,y) is either inside or outside a shape in a graph created be a set of experimental points

3 jours ago | 1

| accepted

Sum all possible combinations of tablecolumns
You can get all possible combinations of k columns choosen out of given n columns using nchoosek. REad about this function. You ...

3 jours ago | 0

| accepted

Declared variable shown as undefined
N=4; function cost=hybrid_cost(x,N) cost=0; T1=0; q=zeros(N); q(1,1)=x(1); q(N,N)=x(2); M=create_M(x); Ai...

3 jours ago | 0

How do I include the row and column values say P = [2;4] into an equation where z = 10 + 2 (where 2 is the "x" cordinate of P? Thank you
P = [2;4] ; z = 10+P(1) ; You should read about MATLAB array indexing.

3 jours ago | 0

Voronoi Tesselations in Matlab
clc; clear all ; % Inner Square S1 = [-5 -5 ; 5 -5 ; 5 5 ; -5 5] ; % Outer Square S2 = [-10 -10 ; 10 -10 ; 10 10 ; -10 10]...

3 jours ago | 1

Using finite differences to find the displacement (x,y) of a projectile including the effect of drag
There was a type error in updating XxN.....it was typed as xxN instead of XxN.....find the below corrected code: close all clc...

4 jours ago | 0

Stress strain average unique sample points
If (x,y) are your data points. Use the following to avoid the error. [x,idx] = unique(x) ; y = y(idx) ; yi = interp1(x,y,x...

4 jours ago | 0

| accepted

Contourf is plotting weird lines. How to remove them?

4 jours ago | 1

Indexing problem based on value?
B = A(1:6) You should read about array indexing in MATLAB. MATLAB indices are always nonzero positive integers. When you use ...

4 jours ago | 0

| accepted

Why does probabililty distribution for 3D matrix not work with NaN values?
You can skip the computation using isnan. It gives you 1 as out put if number is nan and 0 if number is not a nan. Read about is...

4 jours ago | 0

Draw a line between two points on plotted data and compute its length
px = [1, 2, 5]; py = [1, 2, 1.5]; x = [px(1) py(1)] ; y = [px(2) py(2)] ; z = [px(3) py(3)] ; plot3(x,y,z,'r') d =...

4 jours ago | 1

| accepted

Function Code ( Matlab )
x=9 ; a=1; b=3 ; c=5 ; F = (log(a*x^2+b*x+c)-sin(a*x^2+b*x+c))/(4*pi*x^2+cos(x-2)*(a*x^2+b*x+c)) You must read about MATLA...

5 jours ago | 0

Heatmap of 2D plot
t=[1/512:1/512:5]'; z = zeros(size(t)); col = amp; % This is the color, vary with amp in this case. surface([t t],[amp amp],...

5 jours ago | 0

How to export the result of for loop to the excel file
A = pareto_frontier(:,2:3) ; xlswrite('test.xlsx',A) Also have a look on write2table.

5 jours ago | 0

| accepted

How can I find only points in sector range ?

5 jours ago | 0

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.
You want this. S = load("data.mat") ; data = S.Fe2MnGe_new ; v = data(:,1) ; ca = data(:,2) ; z = data(:,3) ; nx = ...

5 jours ago | 0

| accepted

Compare and remove duplicates with min value of another column
num = xlsread("sample.xlsx") ; C1 = num(:,1) ; C4 = num(:,end) ; [c,ia,ib] = unique(C1) ; N = length(c) ; iwant = zero...

5 jours ago | 0