Effacer les filtres
Effacer les filtres

Selecting columns with specific elements

2 vues (au cours des 30 derniers jours)
Shreya George
Shreya George le 2 Fév 2021
Commenté : Shreya George le 3 Fév 2021
I have a 3x2564 matrix with each row specifying the position coordinates of mesh elements of a 3D domain. I need to call the x-coordinate of elements along the free surface/upper face, with z=0. Is there a way to call out columns with the elements of the third row equal to zero? Or do I have to specifically call out each such element once I go through the 'p' matrix developed in the PDE toolbox?

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 2 Fév 2021
Modifié(e) : KALYAN ACHARJYA le 2 Fév 2021
"Is there a way to call out columns with the elements of the third row equal to zero?"
col_data=find(matrix(3,:)==0)
This col_data gives the column numbers, where 3 rd row elements equal to zero.

Plus de réponses (0)

Tags

Produits


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by