Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB help - searching text for specific words

  1. Jun 16, 2009 #1
    Hello! I stumbled upon these forums and it looks like this is a good place to get an answer to this question. I am an undergrad physics major doing biophysics research and writing a program to help with data analysis. The first step it to write a program in MATLAB that reads in a text file, will search for keywords, and store the strings after those keywords.
    Example, the file would look like:


    Test
    Test Name
    Group
    Group 1
    Group
    Group2
    Subject
    Subject1
    Property1


    I need to look through this file. When I get to test, I read the test name, store it, then when it gets to group, read the group name, store it, look for subjects, read subject name and some other properties, store them, then look for another subject, then for another group, then for another test. My issue is reading the strings looking for these keywords, then storing the words after them. I think the textscan function is what I need to use but I am new to matlab programming and not sure how exactly it works. Any help would be greatly appreciated!!

    Thanks!
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: MATLAB help - searching text for specific words
  1. MATLAB removing text (Replies: 2)

Loading...