フィルターのクリア

How to insert value in the first of vector?

3 ビュー (過去 30 日間)
Mira le
Mira le 2019 年 12 月 29 日
回答済み: Star Strider 2019 年 12 月 29 日
CumProb
ans =
0.1579 0.2105 0.3158 0.4211 0.5263 0.7895 1.0000
I want to insert the value 0 at the begining of the vector CumProb
the result=
0 0.1579 0.2105 0.3158 0.4211 0.5263 0.7895 1.0000

採用された回答

Star Strider
Star Strider 2019 年 12 月 29 日
Probably the easiest way is to do exactly that:
CumProb = [0.1579 0.2105 0.3158 0.4211 0.5263 0.7895 1.0000];
CumProb = [0 CumProb];
Another option:
newCumProb = zeros(1,size(CumProb,2)+1);
newCumProb(2:end) = CumProb;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by