Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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 ...

environ 10 ans il y a | 0

Réponse apportée
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....

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

environ 10 ans il y a | 1

Réponse apportée
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...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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' }; ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to do pisewise and spline interpoltaion?
doc linspace doc sin doc interp1 doc plot doc hold should give you plenty to start with.

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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?...

plus de 10 ans il y a | 0

Réponse apportée
Function open/close for GUI
OpeningFcn is called on GUI creation and CloseRequestFcn is called when the GUI closes, but you have to explicitly ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

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

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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' );...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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','...

plus de 10 ans il y a | 2

Réponse apportée
Compare vectors and save the values
idx = ismember( T(:,1), S ); C = T( idx, : );

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
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));

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 10 ans il y a | 0

Réponse apportée
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...

plus de 10 ans il y a | 0

| A accepté

Charger plus