How to equate some 200 random numbers with other 200 random numbers that i have ?? And choose values to find slope from them
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Suppose x equals to some 350 numbers and y equals to some 350 numbers. How to equal them 1 to 1 matching ? And to find the slope from choosing two numbers and there corresponding values ??
6 Comments
Jan
on 15 Nov 2015
What does "equate" or "to equal" mean here? Can you give a small example with 3 numbers?
Maneesh T
on 15 Nov 2015
Edited: Walter Roberson
on 16 Nov 2015
Image Analyst
on 15 Nov 2015
Still not sure what you mean or want. Read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Perhaps the histogram function(s) will help you. Otherwise, see the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F.
Otherwise, make a plot/graph/diagram/screenshot and upload it to illustrate what you want.
i mean i have some 200 numbers 1*360 matrix.
I do not understand what this is. 200 numbers in a vector with 360 elements? So you have some repetitions?
i have to equate with other 200 numbers to say another 1*360
matrix. suppose for value x = value y
Again it is not clear to me, what "equate" means here.
similarly x1 = y1 , x2 = y2.
What is x1, x2, y2, y2? Are you looking for the command ismember?
Can you give us a short example with inputs and outputs?
Maneesh T
on 7 Dec 2015
Steven Lord
on 7 Dec 2015
Interpolate with INTERP1. See the examples in that function's documentation page.
Answers (1)
Jan
on 15 Nov 2015
While I do not understand the first part of your question, getting the slope is possible with different methods:
slope = (y2-y1)/(x2-x1)
or
slope = diff(y)/diff(x)
or
gradient(y,x)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!