How to print out 2 variables using disp() function
이전 댓글 표시
In my script:
- Create 4 variables: len, wid, txt, area
- In 'len' and 'wid' stores two numbers 2 and 3 respectively
- Perform multiplication of 'len' and 'wid' and store the result in the variables 'area'
- In 'txt' store the character array 'The area is: '
- Use disp() function to display 'txt' and 'area' together.
My code looks like this, but the output is weird and I don't know what's the problem, the output suppose to be "The area is: 6"

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!