Need all row data after strcmp
Mostrar comentarios más antiguos
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 comentarios
Githin George
el 22 de Jul. de 2022
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
el 22 de Jul. de 2022
Editada: Santosh Biradar
el 22 de Jul. de 2022
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
el 23 de Jul. de 2022
Jan
el 23 de Jul. de 2022
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.
Respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!