Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Save values in each iteration.

조회 수: 2 (최근 30일)
Ricardo Gutierrez
Ricardo Gutierrez 2019년 8월 20일
마감: Stephan 2019년 8월 20일
Hello !!!
Good Morning.
I have the following code:
-------------------------------------------------- -------------------
clc; clear; close all; short format
Ccl = 21; % Number of column elements
gen = 5; % Number of times the column is generated
for wl = 1: gen
for kk = 1: Ccl
minx1 = 0.2028;
maxx1 = 1.0141;
xx1 = (maxx1-minx1). * rand (1,1) + minx1;
dx1 (kk) = xx1;
dx1 = dx1 ';
dx1 '
end
end
-------------------------------------------------- -----------------------
This code randomly generates a vector of a column with 21 lines (21 X 1), but
I would like to keep the values of the 5 columns.(gen=5)
Normally the value of the "gen" variable can be 500.
Greetings and thanks.

답변 (0개)

태그

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by