MATLAB: Can anyone help me plz ?? ginput I wrote this code but I can't plot anything and there prompt={'Enter Th Number Of Lines:'}; title='Draw Line '; n=inputdlg(prompt); A= cell2mat(n); [x,y] = ginput(A); plot(x,y) Best Answer prompt={'Enter The Number Of Lines:'}; title='Draw Line '; n=inputdlg(prompt); A = str2num(cell2mat(n)); [x,y] = ginput(A); plot(x,y) Related SolutionsMATLAB: How to show full dialog box title prompt={'Enter the matrix size for x^2:',... 'Enter the colormap name:'};name='Input for Peaks function';defaultanswer={'20','hsv'};N=50; %this will control the width of the inputdlganswer=inputdlg(prompt,name,[1 N],defaultanswer);Reference: How can I make an input dialog box created by INPUTDLG wide enough to show the entire title? MATLAB: We create plots from vectors x and y. Is the reverse possible? Can you first draw a curve using cursor in the figure palette and then create vectors x and y from it figureaxis([0 10 0 10])N = 5; % number of poins title('click anywhere') ;[x,y] = ginput(N) ;plot(x,y) ; Related QuestionSUBPLOT : UPPER & LOWER PLOTMessage box in not workingI am getting a straight line while running the following code. What is going wrong?Expanding 1D array using for loopHow do i resolve the error Index exceeds matrix dimensions
Best Answer