-
This feature can be realized.
a=[1 2 5]';
set(,'string',a);
Note: The max property of edit1 is set to a value of 100 or greater.
-
For example, if the edit text has the handle edit1, write where you want the program to display the edit text
s = get(,'string');Get all characters if length(s) >4
set (,'string',s(1:4));If the s length is greater than 4, only the first four characters are used
-
It's a data transfer issue:
1. The callback function of this edit;
2. Set the global variable globla a=get(,'string');
3. Define the same global variable globla a in the program or callback function you need to use;
This way, the A in the edit can be passed to where you need it.
-
Everything input from edit is string type data, you can use str2num to convert the obtained string type data into mathematical numbers, and use the get command to get the data in edit, for example: the number you input from edit1 is 1, then the ** that the daemon gets the data of 1 is a=get(edit1,'string'At this time, the obtained a is string-type data, and then use str2num to convert the obtained string-type data into mathematical numbers a=str2num(a), at this time, the value of a is 1, of course, you can add and subtract, the same way you can obtain the data in any edit, and convert it into the corresponding number, and perform related operations. As for the result display, a command that exists with the get command is the set command, this function is used to set the relevant properties of the gui control, we just got the string attribute of the edit control, and now use the set command to assign the result you calculated to the string attribute of the edit control, for example:
The result of the addition calculation is result, the value type of this variable is the computable data type num, and then the data type of result must be converted to string when assigning the value to the string attribute of the edit control, which can be done by using the num2str function, and the assignment value is:
set(edit,'string',num2str(result)),Friendly reminder:MATLAB control operations are actually handle operations,It is also a good embodiment of object-oriented thinking,Each specific control is a specific object,Each object has a lot of properties,Get the properties of the control and set the properties of the control through the get and set commands,You can imagine how important get and set are!
-
Let's use sprintf to adjust the string format.
-
For example, the edit
text is handled as edit1, just when you want to write the program to display it.
edittext
Write s=
get(,'string');
Get all the characters.
iflength(s)
4set,'string',s(1:4));
If the s length is greater than 4, only the first four characters are used
-
Use ezplot to draw a picture, you can directly draw a graph of a string formula, which is more convenient, such as: ezplot('x^2-y^4')
For more information, you can check Help
As for the detailed GUI design, you can set it up yourself, it shouldn't be difficult.
-
I have a program I wrote before, which is to write the data of the matrix into a txt file, you can look at it, and then change the program according to your needs.
I often output some txt files for later use, and this ** is very handy. You can save it this time or use it later.
**As follows: m= magic(4);
dlmwrite('', m, ' ')
The first line of type is the matrix I defined immediately, with four rows and four columns;
The second line is written to a called''txt file, you don't need to create the file, he will create it himself.
The third line is to output your data on the main interface, which is for your convenience. You can delete this if you don't need it.
Here's the result of the output:
That's about it, it's very simple, I hope you can help you, thank you.
1) is a system of ternary equations:
When x=-1, y=0;Substituting y=ax +bx+c, we get 0=a(-1) +b(-1)+c, that is, a-b+c=0. >>>More
The business types of Zhonggong education mainly include face-to-face training, online distance teaching, various educational guidance books, audio and video, teaching materials and other products, publishing and distribution. Since its establishment, Zhonggong Education has always paid attention to the construction of independent intellectual property rights, and has successively established more than 10 examination research institutes for public service examinations, financial banking, foreign languages, medical care, etc., as well as dozens of local examination research institutes, with more than 6,000 professional full-time teachers, and more than 4,500 kinds of training courses for face-to-face and online school students. In 2012, Zhonggong Education cooperated with the People's Publishing House to establish the "Public Service Examination Center", and established a good strategic cooperative relationship with the People's Publishing House, World Book Publishing Company, Lixin Accounting Publishing House, Southwestern University of Finance and Economics Press, etc., publishing 57 series and more than 3,000 kinds of teaching and auxiliary book products every year.
It's textbox, right? textbook?
double somedouble; >>>More
This depends on what the opposite side chooses The right one to choose after solo The hero has a relationship with each other 803 to go out I recommend a few heroes to compare the tiger The Source of Pain Xiao y Doomsday Messenger Fawn Alchemist Poison Dragon.
is a limitation of oracle, and there are many ways to solve it. >>>More