Index from Matching Element in Table
Mostrar comentarios más antiguos
My overall goal is to replace data in a specific row by input data. (In App Designer, I have three input boxes [string, num, num], and when a button is pushed, I want this data to populate into an exisitng UITable.)
Currently, my table has Column A (Names), Column B (Start), and Column C (End). This is what I is happening/I want to happen:
- A user selects 'jumping' from Column A displayed in a ListBox. (This is working)
- User inputs NewName, NewStart, NewEnd. (Working) User presses okay.
- NewName should replace jumping, NewStart replace jumping start and NewEnd replace jumping end. (Not working)
My idea:
function OkayButtonPushed(app,event)
EditData(app);
end
function editdata(app)
%Find 'jumping' in Column A
%Index_Edit_Row = index of jumping
%[Index_Edit_Row, 2] = NewStart
%[Index_Edit_Row, 3] = NewEnd
end
Later, I want to be able to Delete the selected data row ('jumping' row), but I figure if I know how to edit it, it's a bit easier to delete.
I can't seem to find anything that will find a certain string in a column, then give me the index of it. I think strcmp will tell you if it matches or not, but that's not exactly what I want.
Thank you!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!