Create a matrix with Special properties

조회 수: 6 (최근 30일)
André Pacheco
André Pacheco 2012년 12월 18일
Hello,
I want to generate a matrix that looks like this
V0=10
a=5
matrix=[V0 ,random_number_between_-100_140, a ,(V1) , (V1), random_number_between_-100_140, a ,(V2)]
Where V1=(V0 + random_number_between_-100_140 + a) and V2= (V1+ random_number_between_-100_140 + a)

채택된 답변

Matt Fig
Matt Fig 2012년 12월 18일
편집: Matt Fig 2012년 12월 18일
V0 = 10;
a = 5;
V1 = V0 + randi([-100 140]) + a;
V2 = V1 + randi([-100 140]) + a;
matrix = [V0,randi([-100 140]),a,V1,V1,randi([-100 140]),a,V2]

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by