How to take user input values to create a row vector and column vector?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rohit Sharma
am 3 Mai 2020
Kommentiert: Rohit Sharma
am 3 Mai 2020
I want to write a progam to create two vectors a & b where a is a row vector & b is a column vector. and multiply to create c = a*b.
The values of vector should be taken as user choice.
How I can define a matrix in which the values should be fill by user.
I have use input function but in this the values are not stored as matrix, as far as I am not asking user to put the values in[].
how can I directly put the values in matrix without asking them to write in[].
Thanks in advance.
0 Kommentare
Akzeptierte Antwort
Gautam
am 3 Mai 2020
Try inputdlg instead.
a = str2num(char(inputdlg('Enter a: ')));
b = str2num(char(inputdlg('Enter b: ')));
c = a*b;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!