add count in a for loop
Mostrar comentarios más antiguos
for Row = (1:10)
for Column = (1:10)
fprintf('%d\t',Row*Column);
end
fprintf('\n');
numberofelements = sum(Row*Column(:)<70)+ Row*Column(:)>20);
end
2 comentarios
madhan ravi
el 27 de Ag. de 2020
What’s your question?
Aaron Aguilar
el 27 de Ag. de 2020
Respuestas (1)
madhan ravi
el 27 de Ag. de 2020
[row, column] = deal(1:10);
Counts = nnz(((row .* column(:)) > 70) & ((row .* column(:)) < 20))
Categorías
Más información sobre MATLAB 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!