How to create a vector of submultipliers?

1 回表示 (過去 30 日間)
Karel
Karel 2012 年 8 月 1 日
I want to write some code so that, when I enter a number, I get a vector composed of his sub-multiplier:
example: x=10; vector= [1,2,5,10]
how do you program such a thing?

採用された回答

Sean de Wolski
Sean de Wolski 2012 年 8 月 1 日
x = 100;
v = (x./(1:x));
v = v(ceil(v)==v)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by