How to use assert to prevent cell contains thing which is false
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi guys im trying to use assert to prevent my cell-array data contains 'B to C'. Here is my cell-aray data :
what function that can i used to assert that meet theese condition :
- True when in cell-array dont contains 'B to C'. It can be anything like 'A to B'
- False when in cell-array contains 'B to C'
If there is one or more cells which are 'B to C', then it should stop my code then give warning message "Structure collapsed"
0 comentarios
Respuesta aceptada
Voss
el 21 de Feb. de 2024
assert(~any(strcmp(columnhinge1H2,'B to C')),'Structure collapsed')
2 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!