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 Comments

sonu
sonu on 25 Apr 2013
ANY ONE PLZ HELP.....
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.
the output of my prog is this and i want to select only nearest value that varies between 0 to 25...so i want to reject the value greater then 25...the output variation is minimum...and my graph plot look apox constant or minimum variation.... output:-**
6.99873851067331 8.27740047586335 8.06504953926105 7.87363046695376 10.8271053509749 8.11056249110765 8.26563747791028 7.50691873772702 8.77824438118979 10.0176574187866 10.4389493464010 11.2081181898080 10.1903913222953 14.9170088979533 12.0734307340261 27.8055017745904 13.2095091591494 15.1849258702581 7.57552832771719 4.78675795573154 11.4942493138816 12.3950407599285 12.6841562971568 12.2221041719087 12.7103220135242 24.6697041224465 29.8326468942366 48.7677081167105 38.3453100539144 27.2640244657255 22.6957861246333 52.7053759070235 32.3911990740151 17.3072713866661 16.0877496498917 27.9885600235680 15.5269047834285 19.0274631498168 12.9365593679316 16.5996387278766 18.3368376269409 12.7437859387735 23.8662984953448 24.1724535987885 23.3185637225112 17.6971285056347 18.1417363541124 16.6523765267913
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
sonu on 26 Apr 2013
if this is matrix as an input can u tell me plz how to select value that vary between 0-25 and reject value greater then 25,,,, is there any best curve fit command work on it....

Sign in to comment.

Answers (1)

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.

Categories

Tags

Asked:

on 25 Apr 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!