フィルターのクリア

how to input multiple coordinate values(x,y) to matlab code?

14 ビュー (過去 30 日間)
Abe Ada
Abe Ada 2014 年 6 月 12 日
回答済み: the cyclist 2014 年 6 月 12 日
I wanna to allow the user to input many coordinates (x,y) in to my mat lab code through input function and mat lab calculates give back the answer to user.How can I do that? is there any one can help me?

回答 (1 件)

the cyclist
the cyclist 2014 年 6 月 12 日
Put this line in your code:
inputMatrix = input('Input matrix in standard MATLAB format: ')
Hopefully your user knows that this means they should type something like
[1 2; 3 4]
in response to that. (If not, you need more explicit instructions as part of the input prompt.)
Then, you can use the variable inputMatrix in your code to calculate whatever you want and display it back:
outputMatrix = 2 * inputMatrix;
disp(outputMatrix)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by