Respondida
How to know which push button clicked, to link it with the data retrieval?
Each pushbutton has its own callback by default so you already know which one was pressed. Obviously if you want to do effect...

más de 10 años hace | 0

| aceptada

Respondida
How do I plot this in Matlab?
Just create a T vector as e.g. T = 1:100; If you want P on the y-axis then you need to rearrange the equation a little t...

más de 10 años hace | 1

| aceptada

Respondida
How do i call a pushbutton of my GUI from a MATLAB function which is integrated into a SIMULINK model ?
_Note: This works fine in regular Matlab, I don't know anything about Simulink and whether there are reasons why you can't do th...

más de 10 años hace | 0

Respondida
Assigning cell to variable only assigns first value
Use parentheses instead: behaviours = obj.catsBehavs(1, behaviourIndices); You want to keep the cell array type so don't...

más de 10 años hace | 1

| aceptada

Respondida
How can I load a field from a saved structure?
save('c:\temp\junk.mat', '-struct', 'a'); load('c:\temp\junk.mat', 'Temperature'); should work I think. Or loadedV...

más de 10 años hace | 0

| aceptada

Respondida
what is the difference between dir and ls
Using the syntax list = ls(...) vs list = dir(...) gives a very different result. The former just gives you a c...

más de 10 años hace | 1

| aceptada

Respondida
How can I assign a function to the directional keys of the keyboard for use in a GUI? .
doc uicontrol properties In the 'Interactive Control' section there is a 'KeyPressFcn' property that you can set a callback...

más de 10 años hace | 0

Respondida
How do I loop a matrix with multiple changing variables ?
R = [A; A+B; A+C; B+A; B; B+C; C+A; C+B; C]; will give you the 10 matrices as columns of R which can be reshaped to 3*3 if ...

más de 10 años hace | 0

Respondida
i want to open a new gui from my gui program by clicking next button can anybody help me in this ?
Just call it in the callback of your button in the same way you would launch the first one from the command window via its name....

más de 10 años hace | 0

| aceptada

Respondida
Closing a Gui with button whilst within a infinite while loop?
doc uicontrol properties Look at the section on the *Interruptible* property. This is what you will need for the control th...

más de 10 años hace | 0

Respondida
specify and connect colorbar ranges
You may want/need to create your own colourmap, but just use caxis([0 1]) or whatever the full range across all your plo...

más de 10 años hace | 1

Respondida
How to apply "axis equal" to only two directions while visualizing volume data?
I haven't really used 'axis equal' much but it is just a convenience function. The help documentation actually gives details of...

más de 10 años hace | 0

| aceptada

Respondida
How to zoom in image to have the same size of another
You haven't really given much information, but if your two images have the same size and by same zoom you mean the same xlims an...

más de 10 años hace | 0

Respondida
How do I add a second y axis scale and label to a graph?
doc plotyy should help. I've never used it myself, but I think it does what you are asking. Alternatively: doc yyaxi...

más de 10 años hace | 0

Respondida
how to find index of cell array?
doc ismember should work for this I think. e.g. a = { 'a', 'b', 'c' }; b = { 'b', 'd', 'a', 'a', 'h', 'b' }; ...

más de 10 años hace | 0

| aceptada

Respondida
how to preallocate the variable in matlab code?
That's way too much unformatted code to look through everything, but area = zeros(k,1); will pre-allocated the variable ...

más de 10 años hace | 0

| aceptada

Respondida
How to do pisewise and spline interpoltaion?
doc linspace doc sin doc interp1 doc plot doc hold should give you plenty to start with.

más de 10 años hace | 0

Respondida
I am having trouble with a problem I am working on. The code works until I get to the next step which is a menu asking if the player wants to play the same game again. I can't seem to get it to loop back to the correct spot.
You should just be able to do something like: while true difficulty = menu('Select desired level of difficulty','Easy...

más de 10 años hace | 0

Respondida
I am having trouble getting a code to read in elements of an array. Please help?
A bunch of thoughts on what you have so far... If this is a function aren't the grades supposed to be inputs to the function?...

más de 10 años hace | 0

Respondida
Function open/close for GUI
OpeningFcn is called on GUI creation and CloseRequestFcn is called when the GUI closes, but you have to explicitly ...

más de 10 años hace | 0

| aceptada

Respondida
Function input as a string
If you just give a filename with no path the file must be on your path. Generally you should give a full path to the file to be...

más de 10 años hace | 0

Respondida
Is there anyway to automatically open up a tab that was just generated?
hTabGroup.SelectedTab = hUiTab; will programmatically set the current tab, assuming hTabGroup is your uitabgroup and hUiTab...

más de 10 años hace | 0

Respondida
Hi PLEASE read the following question
[a, b, c] = myFunction( ... ); [d, e, f] = myFunction( ... ); You have total control over the variables into which funct...

más de 10 años hace | 0

| aceptada

Respondida
Timer - plotting graph to axe in current figure
Try the more explicit version which is always better to use: h = plot( handles.axes_realbezmod, bezmod_x, bezmod_y, 'ob' );...

más de 10 años hace | 0

| aceptada

Respondida
How to assign a name to a Table given set of names?
Taking your current solution and making minimal changes, rather than starting from scratch... Subjects = {'Name1','Name2','...

más de 10 años hace | 2

Respondida
Compare vectors and save the values
idx = ismember( T(:,1), S ); C = T( idx, : );

más de 10 años hace | 0

| aceptada

Respondida
Is there any way to create an "init" file that contains commands that will be executed every time while using load function in matlab codes? Please help me in this regard.
Conceptually, just write the function you want, have it call load at the end and call your function instead of the load function...

más de 10 años hace | 1

| aceptada

Respondida
How can I find multiple strings in a cell array?
Try: Match=cellfun(@(x) ismember(x, {'A1','A2','A3'}), Channels, 'UniformOutput', 0); r=find(cell2mat(Match));

más de 10 años hace | 0

| aceptada

Respondida
Setting a Base Class property from Derived class
Taking a bit of a guess from your comments above, this may be relevant to your problem, but either way it is hopefully useful in...

más de 10 años hace | 0

Respondida
Concatenate variable value and variable name into new variable name.
Why would you want to do this though? A variable name is just a handle used in code. Suppose you create these dynamic variable...

más de 10 años hace | 0

| aceptada

Cargar más