how to plot a graph in matlab ?
이전 댓글 표시
Let given array A with 512*512 elements are (here one sample of 4*4 is given)
5 4 6 8
9 11 30 34
12 13 13 14
how to plot a graph where x-axis contains the values of individual elements of 512*256 matrix and y-axis contain the frequency of the difference value. The frequency of difference value can be obtained as
1 -2
-2 -4
-1 -1
here the difference value can be found by subtracting the 2 consecutive elements in a row.Now suppose the original matrix A is 512*512 elements, then the difference matrix will be 512 * 256 elements.
Kindly suggest
댓글 수: 5
KSSV
2017년 10월 3일
Do you have any pictorial example?
Walter Roberson
2017년 10월 3일
A(:, 1:2:end) - A(:,2:2:end) would give you a 512 x 256 array.
You have not indicated why the output should only be 256 rows.
aditya sahu
2017년 10월 3일
aditya sahu
2017년 10월 3일
aditya sahu
2017년 10월 3일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!