【发布时间】:2018-08-31 17:56:22
【问题描述】:
所以,我有一系列的显示功能,从 x1 到 x7。这些都包含字符串和变量,例如:
x1 = ['The result of the scalar multiplication of V and U: ',num2str(scalar_uv)];
x2 = similar to above but with for example a value on the cross multiplication of the two scalars.
而不是通过以下方式打印出每一个:
disp(x1);
disp(x2);
disp(x3);
我认为可以通过 for 循环或嵌套的 for 循环将它们全部打印出来,但我不知道该怎么做。我最好不想要直接的解决方案(我不会对他们说不),而是想要一些可能的提示或技巧。
【问题讨论】:
-
我无法让它正常运行,而是先打印出所有文本,然后打印出看起来不太好的值。它还有丑陋的 C(1,:) = 等等。