selecitng lines of same intercept from two matrices
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi
I have two matrices. Each of these matrices have straigh lines. For example in matrix A, i have 6 stragith lines. All of these lines havean y intercetp, and all have same slope. In matric B, i have another set og 6 lines. They also have same slope, and intercept times.
I like to compare lines between matrix A and matrix B, and only select that line which has same y intercept.
so for example, in matrix A, y intercept of 6 lines i s, 1,2,3,4,5,6 and in matrix B, y intercept is 1.5,2,2.5,4,5.5,6. so i like to select lines fromeither matrix A or B which have common intercept, that i s, line 2,4,and 6.
I have added images of two matrices. In both of these matrices, line1, 3 and 5th have same intercept.
I need to get these lines and save in a new matrix. These lines do not have the sampel element values
thanks
sal
4 comentarios
Rik
el 9 de Nov. de 2020
Again, I don't understand your description, but if you have this:
A_data=[1,2,3,4,5,6];
B_data=[1.5,2,2.5,4,5.5,6];
Then you can use ismember to extract [2,4,6].
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!