Answered
Gui that opens another gui. Need to send variables from one gui to other gui and vice versa
Here is an example. Adapt it to your needs... function [] = gui_passdata() % Pass data back and forth... S.fh ...

15 years ago | 1

Answered
how to detect vector value in sequence in stateflow
Another alternative: correct = @(x) any(strfind(x>5,[1 1 1 1 1])) if correct(X1) y = 1000; else % Whatever e...

15 years ago | 2

Answered
How to replace part of variable name in loop
In short, don't do it! <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F There a...

15 years ago | 2

Answered
assigning matrices to a cell
Use: Bla_2{k} = Y; But before the outer loop starts, pre-allocate the cell array: Bla_2 = cell(K2,1);

15 years ago | 0

Answered
what's the time of pause(1)
Try this: tic,pause(1),toc The elapsed time should be slightly over 1 second, due to calling the pause function and other ...

15 years ago | 0

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
A "Views" counter for the questions.

15 years ago | 5

Answered
What is your unusual use of MATLAB?
This is funny, and kind of embarrassing to admit, but I use my timer function, <http://www.mathworks.com/matlabcentral/fileexcha...

15 years ago | 8

Answered
meshgrid
Are you running out of memory? Why not tell us what prompted you to ask the question??? There is nothing syntactically wrong w...

15 years ago | 0

Answered
How do I set tooltip strings on scatter children?
The children of the handle to h are patch objects, which have no tooltipstring. You could do something similar to what I did ...

15 years ago | 0

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
I am adding this again because it is *REALLY, VERY* annoying! We should be able to put quotes around a paragraph or sentence an...

15 years ago | 3

Answered
Remove columns from a matrix with a loop.
Quoting myself (although the quotes really mess up a post!) from your <http://www.mathworks.com/matlabcentral/answers/8899-selec...

15 years ago | 1

Answered
Cannot use GETFRAME when rendering in OpenGL
Try this, but don't use a docked figure. Just use GETFRAME the normal way, but switch to software rendering of OPENGL. You sho...

15 years ago | 0

| accepted

Answered
Grabbing variable names when passing into function
See the help for <http://www.mathworks.com/help/techdoc/ref/inputname.html INPUTNAME>.

15 years ago | 0

| accepted

Answered
Gridline Proportions when exporting *.emf
I wonder if one of these would help you: <http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig export fig> <ht...

15 years ago | 0

| accepted

Answered
Common Non-Zero Elements Among 5 Arrays
I am still a uncertain if this is what you want, but here goes: idx0 = (dat1==dat2 | dat1==dat3 | dat1==dat4 | dat1==dat5) ...

15 years ago | 0

| accepted

Answered
Elegant way to replicate a vector, placing it into each cell in a cell array
mycell = repmat({A},2,3) Your MAT2CELL method properly pre-allocates a cell array, in the sense James Tursa is talking about....

15 years ago | 1

| accepted

Answered
A problem with floating point arithmetic
You are seeing the limits of <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F floa...

15 years ago | 0

| accepted

Answered
Pull String out of Edit Text without user hitting enter
The only way I know to do this (that doesn't involve Java), is to capture the user's input using the keypressfcn. As the user t...

15 years ago | 4

| accepted

Answered
Eliminate for-loop
z = bsxfun(@times,y,(1:divs_n).')

15 years ago | 1

| accepted

Answered
How can I use current path and all sub folders instead of just current path?
From the command window, got to File>Set Path. Then select Add with subfolders.

15 years ago | 1

| accepted

Answered
How can I create a function which evaluate only strings which represent only mathematical functions?
Here is a radical idea, and I cannot guarantee it will work. But it might be worth a try.. str = '! dir &'; % Example of so...

15 years ago | 1

Answered
How to put the lengths of each string in a cell array of strings into a single vector?
a={'the', 'quick', 'brown', 'fox'} L = cellfun('size',a,2)

15 years ago | 0

Answered
function deal()
y = cell(1,3); % dispense with the y1, y2, y3 stuff.... [y{:}] = deal(5) or, without defining the variable first: [Y{1:...

15 years ago | 0

| accepted

Answered
passing values between guis?
I assume your main gui is called maingui? If so, then this line: mainguiFigureHandle = maingui; is what is creating an...

15 years ago | 0

| accepted

Answered
Selectivly remove values from a matrix with a loop
It looks like you are using a cell array. dataarray = {9, [8 8;9 9], 7, 0, [5 9], 0, magic(2), 0, 'string'} dataarray = dat...

15 years ago | 0

| accepted

Answered
strange Index exceeds matrix dimensions (MATLAB bug?)
If size(sI) is as you say, then indexing into it with values greater than 512*672 = 344064 should indeed cause an error! max(...

15 years ago | 0

Answered
extracting values and respective rows from a colummn
I assume your A and B look something like this: % Create some data to work with... B = [3 5 7 9].'; A = round(rand(10)*...

15 years ago | 1

| accepted

Answered
Changing font size using xlabel
I suggest you edit your original post (read: don't make a new answer) to include the output from this: xl = xlabel(printnom...

15 years ago | 0

| accepted

Answered
Matrix dimensions must agree
Use .* instead of * when you desire element-by-element multiplication. For example, x = 1:3 y = 4:6 x.*y

15 years ago | 0

Answered
How can I divide a matrix in to vectors?
Please read this link before you even think about creating many vectors from an array like this: <http://www.mathworks.com/mat...

15 years ago | 2

Load more