Answered
Discretizing matlab slider GUI
Hamad - you will have to add some code in order to discretize the slider for the case where you slide the "slider" without using...

12 years ago | 2

| accepted

Answered
GUI with two popup menus
kanimbla - the way your code is structured, you don't really need to use callbacks for the popup menus since nothing is plotted ...

12 years ago | 2

| accepted

Answered
how to reduce the running time of the code?
Abirami - you should profile your code to see where the bottlenecks are. Visit the link <http://www.mathworks.com/help/matlab/r...

12 years ago | 0

| accepted

Answered
how to read a large binary file(*.dat file format) and store it in another file?
Girija - do you have four files, one for latitude, longitude, pressure and temperature? Or are all four pieces of information s...

12 years ago | 0

Answered
Saving cells created using mat2cell
Julia - if I run a subset of your code, and in particular, the line assignin('base', ['cutPre' num2str(i,j,k)], cutPre{i,j,...

12 years ago | 0

| accepted

Answered
how to extract the value from voronoi diagram in matlab?
Arul - if you want to get the vertices for each Voronoi cell, then use <http://www.mathworks.com/help/matlab/ref/voronoin.html v...

12 years ago | 0

| accepted

Answered
Replace values like (-999) in matrix to zero with one statement?!
Mohammed - try something like the following. If *mtx* is your matrix % create a 5x5 matrix mtx = [-999 1 2 3 ...

12 years ago | 0

| accepted

Answered
Suplabel.m deletes legends from multiple subplots
Valerie - I was able to reproduce the same behaviour. In one of the comments (by Jeff) at <http://www.mathworks.com/matlabcentr...

12 years ago | 1

| accepted

Answered
Help needed in choosing population size
Burak - I think that you may want a larger population. Ten members may not be enough to introduce enough "genetic diversity" in...

12 years ago | 0

Answered
How to make sure that matlab answer in command window is copied to text file in two distinct columns(in exactly the same way as a mirror image of the command window)?
Antoine - running your above code as (for example) rowpermutation3(1:5,22:25) does not seem to produce the desired output...

12 years ago | 0

Answered
How to understand gui handles ?
Adrien - you will want to use the <http://www.mathworks.com/help/matlab/ref/guidata.html guidata> function to set and retrieve u...

12 years ago | 10

| accepted

Answered
Convert string to cell array
Artyom - try using <http://www.mathworks.com/help/matlab/ref/textscan.html textscan> to read the data from the string. Somethin...

12 years ago | 4

| accepted

Answered
I have a problem about mex file!
Lucy - I was able to reproduce the crash; MATLAB does not indeed close when you run the compiled program. The problem is with t...

12 years ago | 0

Answered
Populate a uitable with files of directory
Gustavo - you just about have the correct code. All that is missing is to build the cell array of files names within the *for* ...

12 years ago | 2

Answered
Stopping criterion in GA
alexaa - what you can do is compare, at each generation, the best found solution with the best one from the previous generation/...

12 years ago | 0

| accepted

Answered
Conversion to function_handle from double is not possible.
Nabhdeep - a couple of things. Typically when an error message is generated, the line number corresponding to the code (and the...

12 years ago | 0

Answered
matlab horzcat CAT arguments dimensions are not consistent.
Saúl - if you want to merge the two matrices as shown above (horizontally), the two matrices must have the same number of rows. ...

12 years ago | 1

Answered
Plotting to an axis-object in a GUI externally
Quirin - I guess that you are running the script outside of the GUI (or is it being invoked in response to a push button or othe...

12 years ago | 0

| accepted

Answered
Uigetdir error when reading images from different directory
Abhishek - while your code calls the function *uigetdir*, you don't make use of what is returned by it. At <http://www.mathwork...

12 years ago | 0

Answered
RGB channel extraction problem
chess - to extract the correct channel, you have to remember that it is the third dimension that indicates colour. So if *img* ...

12 years ago | 2

| accepted

Answered
Converting a cell array of dissimilar structs to an array of structs
Matthew - using your example, you could first try getting a list of all the unique fields from all structures of the cell array ...

12 years ago | 1

| accepted

Answered
help to write genetic algorithm cross over code
Reshdev - in your above example, you have chosen a cross-over point at row 1, column 6. You then switched the "halves" of the t...

12 years ago | 0

Answered
How to code this command in gui?
Jonathan - you almost have the correct code. You will need to use the *get* function in order to get the string data from the w...

12 years ago | 1

| accepted

Answered
Momentum Strategy Error - Index exceeds matrix dimensions..?
The error, *Index exceeds matrix dimensions*, generally means that the code is attempting to access an element in a matrix (or a...

12 years ago | 1

Answered
How do I create a random double generator where only multiples of .05 are used?
Giann - you could create an array of all the numbers within the interval [0.25, 0.7] that are multiples of 0.5, and then just ra...

12 years ago | 1

| accepted

Answered
how to highlight editbox text when press ´return´ using findjobj?
Sejo - you can try the following by using the <http://www.mathworks.com/help/matlab/ref/uicontrol.html uicontrol> function to gi...

12 years ago | 1

| accepted

Answered
help for roulette-wheel selection matlab code for minimization problem?
reshdev - I took your code to initialize the population and to score each member, and put both in the *myInitPop.m* and *myFitne...

12 years ago | 2

| accepted

Answered
Combine two images from two callbacks
Due to the different number of rows, the error message makes sense. Though I would have expected a Error using horzcat D...

12 years ago | 0

| accepted

Answered
Change the file-name in tblwrite when created table
Ahmed - you don't really state what the problem is with your code, only that the attempt failed. But based on your question hea...

12 years ago | 0

| accepted

Load more