필터 지우기
필터 지우기

simple doubt about vector

조회 수: 1 (최근 30일)
Hugo Matias
Hugo Matias 2018년 11월 9일
편집: madhan ravi 2018년 11월 11일
Hi I have a simple daught on matlab and I was hoping you could help me!
Imagine i generate a random vector:
a=randi(5,1,7)
and it generates: 1 3 4 2 5 1 2
My daught is: how do i replace the 1's by 10's?

채택된 답변

madhan ravi
madhan ravi 2018년 11월 9일
편집: madhan ravi 2018년 11월 9일
a=randi(5,1,7)
a(a==1)=10
  댓글 수: 1
madhan ravi
madhan ravi 2018년 11월 9일
편집: madhan ravi 2018년 11월 11일
If this is what you want make sure to accept the answer so that people know the question is solved else let know

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by