inputdlg, Several boxes in one line.

How can make in the following code several boxes in one line? Right now I need to leave a space between entries.
Thank you
clear all
clc
prompt={'Enter the dimension:','Enter x-direction cut-off, Nx, Enter z-direction cut-off Nz'...
'Enter left boundary position, Enter right boundary position'...
'Enter lower boundary position, Enter upper boundary position'...
};
% Create all your text fields with the questions specified by the variable prompt.
title='Inputs';
% The main title of your input dialog interface.
answer=inputdlg(prompt,title);
cutoff = str2num(answer{2});
xdirection = str2num(answer{3});
zdirection = str2num(answer{4});
Nx=cutoff(1,1);
Nz=cutoff(1,2);
Lx=xdirection(1,1);
Rx=xdirection(1,2);
Lz=zdirection(1,1);
Uz=zdirection(1,2);

3 件のコメント

Matt Fig
Matt Fig 2012 年 12 月 2 日
What do you mean "leave a space between the entries"? What entries? What space?
Kamuran
Kamuran 2012 年 12 月 2 日
If you run that code you will see a data input box with 4 input boxes. Last 3 of them are used for entering 2 data for each. But I want to have 2 boxes in each line.
Matt Fig
Matt Fig 2012 年 12 月 2 日
I see. I think you will have to write your own GUI for that.

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 12 月 2 日

0 投票

You would have to edit the source for inputdlg() to do that -- that or do your own GUI construction instead of using the handy inputdlg()

2 件のコメント

Kamuran
Kamuran 2012 年 12 月 2 日
I am trying to use GUI too but I did not understand how to edit inputdlg. Can you make it more clear?
Thank you
Walter Roberson
Walter Roberson 2012 年 12 月 2 日
At the MATLAB command line, enter the command
edit inputdlg

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2012 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by