How can i make a matrix with variables from workspace.
4 ビュー (過去 30 日間)
I have made a matrix and saved the matrix lines seeratly, as for example: line1, line 2, line 3
How can I write a for loop for creating a matrix, where the programm asks which lines i want o include in my new matrix.
%Those lines are saved as a vector
回答 (1 件)
Kshitij Chhabra 2021 年 11 月 3 日
As Stephen mentioned in one of the comments, creation of numbered variables would be an in-efficient approach. However as you mentioned that, you want the program to ask the lines which you want to include in the output, I can recommend using the "input" keyword inside a for loop and then perform the related options accordingly. You can check the follwing code for reference
You can check the documentation for input here.