필터 지우기
필터 지우기

store the result of one row for 100 iterations to a matrix

조회 수: 1 (최근 30일)
HASAN AL-KAF
HASAN AL-KAF 2017년 10월 28일
답변: Walter Roberson 2017년 10월 28일
HI i have this function which is sub main function. if i have 100 iterations in my main function that call my sub main function. i want code to store the FeatIndex matrix which is random values to store in a matrix for all the iteration so i can know what are theses random values in FeatIndex for 100 iterations.
function z=MinOne1111(x)
FeatIndex = randi([1 401],120,1)
x = x([FeatIndex],:);
z= x ;
end

채택된 답변

Walter Roberson
Walter Roberson 2017년 10월 28일
function [z, FeatIndex] = MinOne1111(x)
FeatIndex = randi([1 401],120,1)
x = x([FeatIndex],:);
z= x ;
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by