How to prompt input dialog for entering matrix elements in matlab? -
i ask there way let user enter matrix elements (eg. 3x3 matrix) in input dialog has total 9 boxes in square manner in matlab. know matlab got inputdlg function input box in vertical manner. know there other option other using gui. concept asking user matrix size , prompt corresponding number of boxes matrix elements.
this how have done (for solving simultaneus equations), problem using data in matrix dont think creates matrix because wont find det ` clear clc
prompt={'x:','y:','z:'} dlg_title='matrix a' num_lines=[1 50] def={'3','4','8'} a=inputdlg(prompt,dlg_title,num_lines,def) dlg_title='matrix b' def={'4','3','-3'} b=inputdlg(prompt,dlg_title,num_lines,def) dlg_title='matrix c' def={'5','-4','-2'} c=inputdlg(prompt,dlg_title,num_lines,def) d=[a,b,c]'`
Comments
Post a Comment