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.(adsbygoogle = window.adsbygoogle || []).push({});

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!

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB help - searching text for specific words

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for MATLAB help searching |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB MATLab: Not enough inputs for nlinfit |

MATLAB Help needed to fix a matlab code |

**Physics Forums | Science Articles, Homework Help, Discussion**