フィルターのクリア

Error on REPMAT PROBLEM

7 ビュー (過去 30 日間)
Saptorshee Chakraborty
Saptorshee Chakraborty 2018 年 10 月 9 日
編集済み: Walter Roberson 2018 年 10 月 10 日
Can anyone tell me what is this error:
Error using repmat
Replication factors must be a row vector of integers or integer scalars.
Error in simple_example (line 15)
beta(1:N*0.3,:)=repmat([0.5 -0.5],N*0.3,1);
My N= 85, T=51 , X= X1, X2, X3,

回答 (1 件)

Star Strider
Star Strider 2018 年 10 月 10 日
The arguments designating the dimensions to be replicated must be integers. It is not possible to replicate a fraction of a dimension.
The same applies to your column subscript for ‘beta’.
Use floor, ceil, or similar functions to create integers from the calculations that now result in fractions.
  2 件のコメント
Saptorshee Chakraborty
Saptorshee Chakraborty 2018 年 10 月 10 日
Thank you very much, I will try
Star Strider
Star Strider 2018 年 10 月 10 日
My pleasure.

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

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by