In M file I am able to give a Text Input and I can Do the processing in that, but this operation how can I perform in Simulink that I dont knw and had tried a lot but i am unable to found that block which can accept the Text like[Harris is good boy]should be the input . Please help me in finding the block in Simulink.

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 2월 24일

0 개 추천

Simulink signals can only be numeric or buses (structures) comprising numeric types. Character data types are not allowed. Perhaps you could try representing your text in ASCII or some other binary form.

댓글 수: 4

anavaratha
anavaratha 2012년 2월 25일
Yeah I agreed, but how would like convert the Character input to ASCII in simulink
Kaustubha Govind
Kaustubha Govind 2012년 2월 27일
You can perform the conversion in MATLAB and then import the converted array into Simulink. Use double(str) to convert a string variable 'str' to its ASCII equivalent. For example, drag a Constant block into a model and then enter double('Harris is good boy') as the Value. Note that most Simulink blocks required a fixed-signal signal, so the length of the string should be constant.
anavaratha
anavaratha 2012년 3월 10일
Thank you for your help , I got it
Walter Roberson
Walter Roberson 2019년 3월 2일
As of R2018a, strings are now supported.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

태그

질문:

2012년 2월 24일

댓글:

2019년 3월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by