Community Profile

# KSSV

##### Last seen: Today
7 959 total contributions since 2011

Professional Interests: Mathematical Computing

View details...

Contributions in
View by

Interpolate NaN on graph

ungefär 10 timmar ago | 0

How to efficiently match the zeros of 1 matrix with another
If D and S are your matrices of size 26*12*160. To repalce zeros in S where D is zero, simply use: idx = D ==0 ; % get indices...

ungefär 10 timmar ago | 0

| accepted

How to modify the code below so it can loop over certain files rather then 1?
csvFiles = dir("*.csv") ; N = length(csvFiles) ; for i = 1:N XY = dlmread(csvFiles(i).name); % [xc,yc,Re,a] = c...

ungefär 10 timmar ago | 1

want to read 38 csv files only first and second column?
csvFiles = dir("*.csv") ; N = length(csvFiles) ; for i = 1:N data = csvread(csvFiles(i).name) ; % also read about xlsre...

ungefär 12 timmar ago | 0

How i can solve the this second order diffrential equation
syms y(x) c w Dy = diff(y,x) ; D2y = diff(Dy,x) ; ode = D2y-(3+2*w)*cot(x)*Dy-2*(1+w)*y==(16/3)*w*(c^2)*(cos(x)^2)+(16/...

ungefär 16 timmar ago | 0

plotting map from a matrix
You can use pcolor. Read about it. Also have a look on surf. You can have a look on this package: https://www.eoas.ubc.ca/~ric...

ungefär 16 timmar ago | 0

How can I get the secondary diagonal of a matrix?
Read about diag. You can get diagonal elements by using that. A = rand(5) ; diag(A) diag(A,-1) diag(A,1) May be you are lo...

ungefär 16 timmar ago | 0

Different assignment of coordinates in meshgrid().
Let A be your 3D matrix. [m,n,p] = size(A) ; [X,Y,Z] = meshgrid(1:p,1:n,1:m) ;

ungefär 18 timmar ago | 0

How can I create unique rows in a matrix?
A = [ 0 0 0 3 6 6 4 5 6 4 6 5 5 4 6 5 5 5 5 ...

ungefär 19 timmar ago | 0

Figure does not display graph
Replace the lines: plot(x,y,'red') with plot(x,y,'color','red') Make these changes: plot(torque, W,'color', 'blue') %angu...

ungefär 20 timmar ago | 1

| accepted

how to create a 3d plot for this matrix
Read about spy. A = randi(10,10) ; A(A>1) = 0 ; spy(A)

ungefär 24 timmar ago | 0

How to split sentence?
s = strsplit(cover_str,'.')

en dag ago | 0

| accepted

Error: Unable to perform assignment because the left and right sides have a different number of elements.
This line: y(j)=x(j)+sigma*randn(size(j)); will create error..because, you are trying to save more number of elements then it...

2 dagar ago | 0

Making the assumption to be the same as results
ro_init=0.2:0.1:100; r = 200 ; c = 200 ; % Try increasing these values B = linspace(0,0.1,r) ; N = linspace(0.8,2,c) ; [B...

2 dagar ago | 0

| accepted

Selective summary of matrix array

2 dagar ago | 1

| accepted

The function is fine...there is one typo error..... you should use '=' not '==' function output = findtype(input); [r c] = si...

3 dagar ago | 0

How to find which curve fit best to another curve

3 dagar ago | 0

how to write name on plotted graph?
Read about legend. p=[123 456 344 333 667 899 565 546 688 998 765 467] T=[30 45 55 66 77 54 32 34 25 70 12 34] m=[1.00 2.00 2...

3 dagar ago | 0

How do I allocate one point only in matrix A to its closest point in matrix B
Read about knnsearch. This function will give you the number points you specified which are close. https://in.mathworks.com/he...

4 dagar ago | 0

Finding the maximum of a vector using only for loop and the routine length
v = [ 1 5 6 23 43 5 2 5 2 23 53 45 6 3 4] ; n = length(v) ; themax = 0 ; pos = 1 ; for i = 1:n if v(i)> themax ...

4 dagar ago | 0

Function function/ passing function/ varargin help?
a = 8 ; b = 0.25 ; c = 2 ; n = 180 ; f = @(t) a*exp(-b*t).*sin(t-c); t = linspace(a,b,n); y = f(t); fdiff = ma...

4 dagar ago | 0

How to use previous points calculated from a function.
You can solve the given equation: R = d2*(t2-t1)/(d1-d2) ; for d2 and solve it to get d2. We have d2 as: d2 = R*d1/(R-t1+t2) ...

4 dagar ago | 0

How to solve a set of equations with a vector as input
n = 1000 ; P = linspace(0,50,n) ; wm = (P./k).^(1/3); ws = wm / (-1.008); Ir = sqrt(P/(-0.567); % this will be com...

5 dagar ago | 1

| accepted

In Matlab, after plotting a figure then I select a range of area and replot again
Yes you can very much do it.... If you have limits/ range for x-axis; you can limit your range in the existing plot using xlim,...

5 dagar ago | 0

| accepted

y'=1-(y/x), y(2)=-1, change in x =0.5. Im supposed to use Euler method to solve this differential equation but I'm not getting the answer I want. I have the code but I'm not sure if I'm doing it right.
Your x value is not correct: You need to check this line: x = 2:h:1.5; % the range of x In the above you need to make changes....

5 dagar ago | 0

Breaking a single matrix to multiple matrix.
A = rand(100,3) ; [r,c] = size(A); p = 100/2; % this gives 50 out = permute(reshape(A',[c,r/p,p]),[2,1,3]);

5 dagar ago | 0

| accepted

can anyone find the error?
Save the function in a folder...and : a = 1 ; b = 2 ; c = 3 ; % define your variables quadratic(a,b,c)

5 dagar ago | 1

Sorting an array without sort() command

5 dagar ago | 0