Need all row data after strcmp
이전 댓글 표시
try
in = 'AAA';
p = strcmp(in,raw);
if p >= 0
xlswrite('SummaryResult.xlsx',raw1(p),'AAA','A2')
else
0;
end
end
Once I will compare
I want all the row data where AAA is presnt in those column.
Please let me know for brief.
댓글 수: 5
Githin George
2022년 7월 22일
Hi Santosh,
Can you provide an example of a table and the result you expect.
Also if it helps you can take look at the code below. In this line I am filtering all the rows of a table having value in Col1 = 'AAA'.
filteredTable = tab(tab.Col1 == "AAA",:)
Santosh Biradar
2022년 7월 22일
편집: Santosh Biradar
2022년 7월 22일
An Excel file is less useful, because you can import it in different ways. Please post some code, which produces the inout data or a MAT file.
What is the purpose of the line "if p >= 0"? p is a logical array. Do you mean:
if any(p(:))
What is raw1 and raw?
This line is useless - omit it:
0;
Santosh Biradar
2022년 7월 23일
Jan
2022년 7월 23일
I asked you, what the purpose of "if p >= 0" is. You did not answer this, but post the new line: "if (p(:))". Agaion the purpose is unclear. Do you mean:
if any(p(:))
Do you see, that your can format code in the forum? Please use the corresponding tools.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!