Brace indexing is not supported for variables of this type.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am attempting to extract the contents out of my double array so I would be able to see whether my input variable equals a value in column 1 of mergetables, then use that row to obtain the value in the second column of that row:
mergetables=[SERIAL_NUMBER,BIA_COF_0,BIA_COF_1,BIA_COF_2,BIA_COF_3...
,BIA_COF_4,SF_COF_0,SF_COF_1,SF_COF_2,SF_COF_3,SF_COF_4];
BIA0=mergetables{app.AccelSNEditField == mergetables{:,1},2}
Unfortunately, I obtain this error:
Brace indexing is not supported for variables of this type.
Any suggestions or resolutions to apply?
0 comentarios
Respuestas (1)
Dinesh Yadav
el 23 de Jul. de 2020
Split up your last line of code into two line.
indexes = app.AccelSNEditField == mergetables{:,1}
to get logical values for the indexes that you will be using to get the second column.
BIA0=mergetables{indexes,2};
0 comentarios
Ver también
Categorías
Más información sobre Matrix Indexing 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!