필터 지우기
필터 지우기

Array of Factors of a Variable

조회 수: 2 (최근 30일)
JWalker
JWalker 2018년 12월 3일
편집: JWalker 2018년 12월 3일
I need an array such that all values betweem set limits are factors of a variable
put briefly I need every value to do: Variable/ArrayValue = Integer
Tf = 100000
nStepsFinal = 200; %Final number of step
for nSteps = 1:1:nStepsFinal %Loop of increasing step size
tStepInit = Tf/nSteps; %Time period of set step value
tStepInit2 = floor(tStepInit); %Remove non-intergers
tStep = unique(tStepInit2); %Remove duplicates
tSteps(nSteps) = tStep;
end
this was my first attempt, Tf is the variable that it was to be a factor of, obviosly I could run this process again back and forth between the tStep variable and nStep variable a number of times until it worked, but I would need to do it thousands of times. Is there a fesible way to do this?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by