필터 지우기
필터 지우기

Plot approximately 200 different angles in MATLAB

조회 수: 1 (최근 30일)
afrah aziz
afrah aziz 2020년 11월 23일
편집: Image Analyst 2020년 11월 23일
How can i solve this problem : to create 1000 different integer random numbers between -100 to+100, and then rank these numbers from small to large, then plot a graph of these values that consists of blue triangles with interconnecting lines, and the values at approximately 200 different angles.

답변 (1개)

Image Analyst
Image Analyst 2020년 11월 23일
편집: Image Analyst 2020년 11월 23일
Afrah:
Sounds like homework. Is it?
Hint:
  1. r = randi(............
  2. rSorted = sort(r...............
  3. plot(rSorted, 'b...........
I have no idea where or how you're supposed to get angles from 1000 random integers. But once you have the angles in an array called "angles" you can get the first 200 by simple indexing:
first200Angles = angles(1:200);
And are the blue triangles ...
  1. the "markers" that are placed at each data point (integer y value) or
  2. are the triangles somehow constructed from triplets of the 1000 points (and if so, how)?

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

제품


릴리스

R12.1

Community Treasure Hunt

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

Start Hunting!

Translated by