필터 지우기
필터 지우기

In the "Section 5 - Further Practice" of MATLAB Onramp, it is stated that, "Indices can be non-consecutive numbers. Try extracting the first, third, and sixth elements of density.". How to do it ?

조회 수: 5 (최근 30일)
In the "Section 5 - Further Practice" of MATLAB Onramp, it is stated that, "Indices can be non-consecutive numbers. Try extracting the first, third, and sixth elements of density.". How to do it ?

답변 (2개)

Lan Lou
Lan Lou 2020년 9월 1일
You would use:
p=density([1 3 6],:)
or
p=density([1 3 6],end)
or
p=density([1 3 6],1)
  댓글 수: 2
Jon Wagner
Jon Wagner 2020년 9월 18일
p=density([1 3 6],1) is correct. this gives the 1st 3rd and 6th element of column 1. since elements start at the top of the first column and move down, then to top of next column.

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


Renad Saad
Renad Saad 2020년 11월 12일
how to do the further practice ???

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by