how to code if else condition

조회 수: 1 (최근 30일)
Ayesha Punjabi
Ayesha Punjabi 2019년 8월 22일
댓글: dpb 2019년 8월 22일
T = 8
T_b = 30
Tag_mat = randi(0:1, T, T_b); % Tag_mat is 8 rows and 30 columns of random 1's and 0's
data_mat is a matrix with one of the row from tag_mat matrix
g_win is a matrix which contains numbers such as 5,7,1,6 (these are the numbers which refers to a calculation stating which of the rows from tag_mat gives proper results)
I want to find if the data_mat and tag_mat values do not match. if the they dont match I have to select the next number from g_win matrix. i was thinking to do it with if else and for loop but I am not sure how should I code it. Can someone please suggest me something about it?
  댓글 수: 2
Jan
Jan 2019년 8월 22일
These sentences are not clear to me: "these are the numbers which refers to a calculation stating which of the rows from tag_mat gives proper results" .
"find if the data_mat and tag_mat values do not match"
dpb
dpb 2019년 8월 22일
As is usually the case, it would be much simpler to explain if you would attach a small section of the data so we can see it and then explain what your expected result should be with it.
Only some 10 lines or so should be plenty to illustrate, but "a picture is worth..."

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by