×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Regarding code.

Regarding code.

Regarding code.

(OP)
Hi,

i am a mechanical engineer with basic in matlab, i am having an array of data for compressor speed and efficiency.

but i would like to filter for speed of 5000 in that array,and also get the efficiencies which are in different arrays for that corresponding speed values.

can anyone suggest me how to get them and also i want them to be placed in a array element box of a new variable which i would create.

hope i could get some infos from you,

with kind regards,

vinod.b

RE: Regarding code.

You can use the find fuction to return the index of the element that matches your search criteria.

i.e.
a = [1 3 4 5 6]

a =

     1     3     4     5     6

>> find(a>4)

ans =

     4     5

>> find(a==4)

ans =

     3

>> b = a(find(a==4))

b =

     4


If your other arrays are the same length then you can use the same index to strip values from the other arrays.

RE: Regarding code.

(OP)
thank you for your nice reply,

i could able to strip off few value from one array that is comp speed.
for example if i want to take values from comp speed from 4000 to 4500 rpm,
i would also like to take the corresponding values of this comp speed in another array in another variable called mas flow. then i would like to put both the filtered comp speed and mass flow for speed 4000 to 4500 in two cells with a new variable named as filtered comp speed.

how to do that ?

waiting for your reply,

thanks,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources