Create a 2d imagesc map to statistic about two arrays and use color to express the intersections of two arrays

조회 수: 1 (최근 30일)
Hello, I have a cell ch_splitB, first column called i and second column called t, third column called rotation. The first task is to combine the first and second column together, and the combination should be 4 digits. Because some digits are just single, and I should put 0 in front of the numbers. For example, ch_split(1,1)=1 and ch_split(1,2)=1, the combination should be 0101. And ch_split(4,1)=1 and ch_split(4,2)=10, the combination should be 0110. I added 0 manually in the variable space but this is complex. Could I have a code that can do this?
The second problem is, after combining column i and t (the new column I called j), I have to statistic about elements with same value. Set a x scale to contain the unique elements of j and set a y scale to contain the unique elements of rotation, and use color to display the number of intersections of x and y. For example, if j=0110 and rotation = 345, and I will calculate how many rows matching this and us color to display this number.
I have searched this many days, and don't know the terms and methods I should use. Thanks.

답변 (1개)

bransa
bransa 2022년 5월 19일
I have written a script to handle your tasks. Let me know if you have any questions

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by