substitute a symbol instead of zeros in a matrix
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have matrix a=[3 5 0;2 0 5;1 0 0] now i want to replace all zeros with any symbols. for example i need output as a=[3 5 *;2 * 5;1 * *]
0 comentarios
Respuestas (1)
Walter Roberson
el 4 de Abr. de 2016
That cannot be done in a numeric array. You can create a string with that content or you can display to the screen (or file) in the form you want, or you can create a cell array of strings that have '*' in those positions -- but you cannot create a numeric array like that.
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!