How do I put variable values into a text string in MATLAB?

前端 未结 5 1163
终归单人心
终归单人心 2021-02-13 19:17

I\'m trying to write a simple function that takes two inputs, x and y, and passes these to three other simple functions that add, multiply, and divide

5条回答
  •  有刺的猬
    2021-02-13 20:10

    Here's how you convert numbers to strings, and join strings to other things (it's weird):

    >> ['the number is ' num2str(15) '.']
    ans =
    the number is 15.
    

提交回复
热议问题