How to use num2str and disp command?

Here's the question I got from lecture,
Find the help pages for num2str and disp.
Given >>speedlimit = 5;
Write a line of code that displays the message “The local speed limit is speedlimit km/h”, inserting the value where indicated.
How can I display those line only using num2str and disp command?

댓글 수: 1

Star Strider
Star Strider 2017년 2월 9일
Quoting the assignment:
Find the help pages for num2str and disp.

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

답변 (1개)

Jan
Jan 2017년 2월 11일

0 개 추천

This
Find the help pages for num2str and disp.
means:
doc num2str
doc disp
You can concatenate strings like this:
['Hi ', 'I am ', 'here']

카테고리

도움말 센터File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

태그

질문:

2017년 2월 9일

답변:

Jan
2017년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by