BEST FIT plot of output
이전 댓글 표시
hi i have a output after the loop pp=[33, 34,30,56,67,34,30,37,99,31,27]
if i want to choose the nearest value in to these can any one tell me what is the command to reject the greater value like 99,67,56 ..and plot them.. thnx
댓글 수: 5
sonu
2013년 4월 25일
Daniel Shub
2013년 4월 25일
You need to tell us more. Basically it sounds like given a vector pp and a value x you want to apply a function f to x and pp such that f will return the greatest value of pp that is less than x. For example for the given pp if
f(pp, 55) would return 30
f(pp, 56) would return 56
f(pp, 57) would return 56
Is this what you want? Does the function f need to support vector input x?
Finally, you need to tell us what have you tried so far.
sonu
2013년 4월 25일
Daniel Shub
2013년 4월 25일
You need to edit the question and use the code markup to explain what the inputs to the function are and what the expected outputs are. Ideally you would provide some minimum code that demonstrates the problem you are having. As it stands now, it is not clear what you want.
sonu
2013년 4월 26일
답변 (1개)
Image Analyst
2013년 4월 26일
Do you mean how to extract those values from pp that are in the range 0-25?
indexesInRange = pp>0 & pp<25
valuesInRange = pp(indexesInRange)
Then you can perform curve fitting on valuesInRange instead of pp.
카테고리
도움말 센터 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!