Answered
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...

10 years ago | 1

| accepted

Answered
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...

10 years ago | 0

Answered
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...

10 years ago | 1

| accepted

Answered
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...

10 years ago | 0

| accepted

Answered
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...

10 years ago | 1

| accepted

Answered
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...

10 years ago | 0

Answered
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 ...

10 years ago | 0

Answered
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....

10 years ago | 0

| accepted

Answered
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...

10 years ago | 0

Answered
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...

10 years ago | 1

Answered
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...

10 years ago | 0

| accepted

Answered
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...

10 years ago | 0

Answered
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...

10 years ago | 0

Answered
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' }; ...

10 years ago | 0

| accepted

Answered
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 ...

10 years ago | 0

| accepted

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

10 years ago | 0

Answered
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?...

10 years ago | 0

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

10 years ago | 0

| accepted

Answered
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...

10 years ago | 0

Answered
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...

10 years ago | 0

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

10 years ago | 0

| accepted

Answered
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' );...

10 years ago | 0

| accepted

Answered
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','...

10 years ago | 2

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

10 years ago | 0

| accepted

Answered
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...

10 years ago | 1

| accepted

Answered
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));

10 years ago | 0

| accepted

Answered
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...

10 years ago | 0

Answered
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...

10 years ago | 0

| accepted

Answered
Possible to use fanplot in a GUI? (SOLVED)
I don't have the Financial Toolbox so I can't test this out, but does fanplot( hist, proj, 'parent', axesHandle ); work?...

10 years ago | 0

Load more