Community Profile

# KSSV

##### Last seen: Today
7,944 total contributions since 2011

Professional Interests: Mathematical Computing

View details...

Contributions in
View by

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

4 hours ago | 0

How to find which curve fit best to another curve

4 hours 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...

4 hours 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...

18 hours 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 ...

18 hours 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...

1 day 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) ...

1 day 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...

2 days 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,...

2 days ago | 0

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....

2 days 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]);

2 days 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)

2 days ago | 1

Sorting an array without sort() command

2 days ago | 0

Index exceeds the number of array of elements error
clear; clc; max = input('Enter limit for vector: '); askingPrice = input('Enter the asking price: '); n = 1; count1 = 0; %s...

2 days ago | 0

Unable to perform assignment because the left and right sides have a different number of elements.
Please note that the error is simple...this occurs when you try to save more number of elements than intialized into an array. ...

3 days ago | 0

Drawing an arc between two elements?
L1=[1 3; 1 6] L2=[-2 2; 8 -1] P=InterX(L1,L2); L = [L2(:,1) P L1(:,2)] ; p = polyfit(L(1,:),L(2,:),2) ; xi = lins...

3 days ago | 0

Double Interpolation from a table
Vq=interp2(x,y,z',m_dot_exhaust(1),T_avg_rankine(1)) ;

3 days ago | 0

| accepted

calculate surface area from xy coordinates (R2017a)
Let (x,y) be your coordinates.... idx = boundary(x,y) ; bx = x(idx) ; by = y(idx) ; A = polyarea(bx,by) ;

3 days ago | 0

Index exceeds matrix dimensions. Error in LT_03 (line 98)
Note that for your formula given you need not to use loop...you can striaght away use: Fk =(f01+f02+f03+f04+f05+f06+f07+f08+f0...

3 days ago | 1

Locating Row and Column of Min. Value
[row column]=find(x==k,1)

3 days ago | 0

Calculation across rows without FOR LOOP
B = table([1;1;1;1;1;2;2;2;3],[1;2;3;4;5;6;7;8;500]); B.Var3 = zeros(height(B),1); i = [false; B.Var1(1:end-1) == B.Var1(2:end...

3 days ago | 0

plotting 3 variables in figure
First you have to laod the .mat file into MATLAB. For this you can use load. Read abotu this function. To plot, you need to kn...

3 days ago | 0

How do I plot a function in terms of another function?
Try this: a = 0:0.01:alphamax; %prof's work figure(5); clf for i=1:length(a) dt(i) = double(subs(eq1(a(i),z))); % ver...

3 days ago | 0

How to change only one input if needed?
prompt = "Enter number greater than 5 " ; m = input(prompt) ; while m > 5 m = input(prompt) ; end

3 days ago | 0

Sum modified laplacian operator
for p = 2:255 for q = 2:255 % do what you want end end

3 days ago | 0

2-D Truss Analysis
Repalce this line: NodePoly=[x ;y ;z]; with NodePoly=[x y z];

3 days ago | 0

How to display the value of output on plot?
Read about text. With this function, you can specify the string str by providing location (x,y). At this position (x,y) you can ...

3 days ago | 0

Finding the intersec point using InterX?
You should read the documentation/ help given in the InterX function. Your curves/ data points should be such that : L1 = [x11 ...

4 days ago | 0

| accepted

plotting 2 graphs on the same axes