hi, I am writing long strings into text file via fprintf. instead of having long lines, I want to break these lines into shorter lines of strings.

for example: I have :""CountyName: Greenbrier The rooms were very nice and clean adn roomy, but the heat/AC was messed up and the food wasn't very good. Also, the juice machine, milk, and pop machine was almost always either watery or not working at all. The stay at West Virginia university was very nice there were very nice ""
I would like County name to appear at lef side of the text and then the remaining of text in a block at right hand side of the text.

1 Kommentar

Your question is a bit unclear on what the output should be. Maybe show the exact format of the desired output.
More importantly, you haven't stated the criteria for determining the end of the country name. Is it always one word (what about New Zealand then?)? Have you got a dictionary of country names? Is the program supposed to do semantic parsing to know where to split?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 17 Sep. 2015

Kommentiert:

am 17 Sep. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by