Answered
Efficient way of preallocating memory
One thing is to use the _class_ input to |zeros| so that the zero matrix is never created in double precision. As you have it r...

14 years ago | 0

Answered
Drawing a line
line([0 5],[0 2])

14 years ago | 0

| accepted

Answered
How to write a function to display two messages to the user (in Matbal 2011)?
doc cat for more info on cats. That looks like it should work, what error are you recieving? *More per comments* A...

14 years ago | 0

Answered
Changing properties of menu
This line causes the "no items to choose from warning": fh=menu; The reason this is working at all is because you are ch...

14 years ago | 0

| accepted

Answered
How to Import a .mat file in simulink ???
You could also run a script that loads the file in one of the model callbacks.

14 years ago | 0

Answered
Handles and Function outputs?
Internally |pdepe()| uses the handles of those functions (with the @) to call them with inputs it determines it needs. It chang...

14 years ago | 1

Answered
Storing values using csapi (spline functin)
Why not just use a |for|-loop? Or you coudl write a wrapper function around |csapi| that uses a |for|-loop internally but a...

14 years ago | 0

Answered
How do I get rid of this path error message?
|ret2price| is part of the Econometrics Toolbox. Do you have this licensed/installed? running: ver at the command li...

14 years ago | 0

Answered
How to histogram equilize an image?
doc histeq doc reshape

14 years ago | 0

Answered
Matlab (2010b) permute does not work for symbolic arrays
<http://www.mathworks.com/support/bugreports/659647>

14 years ago | 0

| accepted

Answered
passing variables from gui to another m file
<http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F FAQ> This should help.

14 years ago | 0

| accepted

Answered
store last m elemnts of a matrix to another matrix
B = A(end-(m-1):end);

14 years ago | 2

| accepted

Answered
PROBLEM RELATED TO GUI IN MATLAB
set(hTextbox,'string',num2str(count)); where hTextbox is the handle to the text box and coutn is the count.

14 years ago | 0

Answered
Hiding contact information
This would be an interesting phenomenon to study. I have _never_ gotten an urgnt doit4me email since starting at MathWorks in N...

14 years ago | 0

Answered
overlap problem
put a break point on line 18 and inspect the sizes of the inputs on the line. Note the error message: _The number of samples...

14 years ago | 0

Solved


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

14 years ago

Answered
Ploting, Imaginary parts of complex X and/or Y arguments ignored
You can either add another dimension to yuor plot (another line or |plot3|) and extract the imaginary parts (using |imag()|) or ...

14 years ago | 0

Answered
Modify colorbar in .fig file
figure; imagesc(magic(20)); h = colorbar; pause %pause so you can see the change on the next line set(h,'ylim',[30 60]); ...

14 years ago | 0

Answered
"Levelling" out a signal with moving average
What about using |medfilt1| in the signal processing toolbox? doc medfilt1 *Edit: more* _pictures really are worth th...

14 years ago | 0

| accepted

Answered
use of fmincon to minimize a sum of a function
Wrap |sum()| around your function before passing it to |fmincon()|. If you want more detailed help, please provide mroe detail....

14 years ago | 0

Answered
Brain Tumor Detection
You could try: load mri if you have the Image Processing Toolbox. I _highly_ doubt any hospital will supply you with da...

14 years ago | 0

Answered
time average of every 100 samples
averages = mean(reshape(x(:),100,[])) Something like this?

14 years ago | 1

Answered
BUG in subs()?
This is functionality available for backward compatibility. If the _old_ does not occur, but the _new_ does, it switches them. ...

14 years ago | 1

| accepted

Answered
I want to implement this matrix
look at |diag|, and |eye|. doc diag doc eye Please provide an actual matrix we can copy and paste into MATLAB (small ex...

14 years ago | 0

Answered
Sorting the number
This would be a good CODY problem: %Parameters: nel = 8; %elements x = 14; %Engine ypos = mod(x,nel); val = circs...

14 years ago | 1

Answered
Obtained weird answers to my Numerical Integration
Use the debugger (set a break point on the first line) and step through line by line. Inspect the value of the variables at eac...

14 years ago | 0

Answered
making an input to an array
doc datestr doc input %specifically look at the 's' option

14 years ago | 0

Answered
read mouse buttons without locking the code
Use the _currentpoint_ property of an axes or figure instead of |ginput|. |ginput| is just a fancy wrapper around this anyway. ...

14 years ago | 0

Answered
Faster Simulink if scopes are switched off?
_Will 'turning off' the scopes reduce the simulation time?_ Yes.

14 years ago | 1

| accepted

Answered
GUIDE-edit text
function exampleEditEnable %Build stuff hFig = figure; hBut = uicontrol('style','push','units','norm','position',[0 0 0.3 0...

14 years ago | 1

| accepted

Load more