fprintf prints Multiple Lines

fprintf('b) Determine the steady state errors:\n\t\t with step input = %.3f,\n\t\t with ramp input = %.3f,\n\t\t with parabola input = %.3f\n', es, er, ep)

4 件のコメント

Stephen23
Stephen23 2021 年 10 月 6 日
One or more of your variables are non-scalar, e.g.:
es = 7.855;
er = 6.545;
ep = inf(1,4);
fprintf('b) Determine the steady state errors:\n\t\t with step input = %.3f,\n\t\t with ramp input = %.3f,\n\t\t with parabola input = %.3f\n', es, er, ep)
b) Determine the steady state errors: with step input = 7.855, with ramp input = 6.545, with parabola input = Inf b) Determine the steady state errors: with step input = Inf, with ramp input = Inf, with parabola input = Inf
Sachini Perera
Sachini Perera 2021 年 10 月 6 日
how do i fix it ?
Walter Roberson
Walter Roberson 2021 年 10 月 6 日
check size(es), size(er), size(ep) and figure out which one is non-scalar. Then backtrack in your code to figure out why it is nonscalar.
Kshitij Chhabra
Kshitij Chhabra 2021 年 10 月 11 日
Hi Sachini,
As mentioned by Walter, it seems that you have non scalar values for your variables. Can you please share the portion of code where you are computing the same so that we can get more idea about your problem?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 10 月 6 日

コメント済み:

2021 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by