Answered
Find submatrix with the maximum sum
Without wanting to do your homework for you, this is a general framework that is often used for keeping track of a maximum and i...

10 years ago | 0

Answered
Manipulate values on axes MATLAB
When you call plot you can pass in x data and y data. These can be anything you want so just set one to be 2000 to 2010 and the...

10 years ago | 0

| accepted

Answered
What is actually Normalized Frequency?
Normalised frequency is frequency in Hz (or more generically cycles/second or some other unit) divided by the sample frequency o...

10 years ago | 6

| accepted

Answered
How to display error messages in Matlab Runtime (compiled) version
Either use errordlg if you want the message to be displayed to the user or if you make sure that your executable creates...

10 years ago | 0

Answered
Matlab calsses - PreGet listener on structures
You would need something more like: addlistener(obj.NewProp, 'myProp1', 'PreGet' , @obj.PreReadProperty); to listen to ...

10 years ago | 0

Answered
While loop data saved into a vector
You initialise counter to 0. 0 is not a real positive integer (or logical). So you should initialise counter = 1; and ...

10 years ago | 0

Answered
Undefined function or variable ... Error while evaluating uicontrol Callback
handles.I = answer(1); guidata( hObject, handles ); in your first callback and I = handles.I; at the start of yo...

10 years ago | 2

| accepted

Answered
Axes dot notation not available when used as property in (handle) classes (Matlab R2014b+)
That does surprise me. I use axes inside classes all over the place, but not all that often in arrays. The following works: ...

10 years ago | 1

| accepted

Answered
How to save variables to a specific cell in a .mat file?
By far the easiest solution, generally speaking, is to just load the whole matrix in from the mat file and then you just write t...

10 years ago | 1

| accepted

Answered
No unittest package found in Matlab 2015b
\MATLAB\R2015b\toolbox\matlab\testframework appears to be where this functionality is located. Assuming that is the same f...

10 years ago | 0

Answered
Error : Undefined function or variable 'I'
I never use assignin( 'base',... ); as I've never found any reason why I would want to do such a thing, but from what I ...

10 years ago | 1

Answered
How to know about FFT bin frequencies
A 65536-pt FFT would, in your case give 1Hz bins for a sample frequency of 65536 Hz. If you only want the FFT from 0 to 6000 ...

10 years ago | 0

Answered
time values must be monotonically non-decreasing
Monotonically non-decreasing means that they must be in a non-decreasing order - i.e. values never increase between one reading...

10 years ago | 0

Answered
plotmatrix - how to change the color according to one variable in data?
The final example of doc plotmatrix shows how colour individual plots if that is what you are aiming to do (at least in ...

10 years ago | 0

Answered
Global variable and class
The definition this.F = eval('@(x)a * x'); has no idea what 'a' is, it has not been defined in this scope. Using eval...

10 years ago | 0

Answered
Definite integral over discrete data
trapz( f( startIdx:endIdx ), A( startIdx:endIdx ) ) where startIdx and endIdx are the indices of the frequencies f1 and f2 ...

10 years ago | 0

Answered
How to reduce execution time in my code?
First step is to run the profiler and find out what is actually taking the time. i.e. profile on eulerforwardsystemsc...

10 years ago | 0

Answered
simultaneous loops in GUI (updating text box)
Code in callbacks (and anywhere else outwith using the parallel toolbox) will always run sequentially. How it does that depends...

10 years ago | 0

Answered
Function requires more input arguments to run?
theta = 7; rho = 10; phi = 100; Bo = 2; Rs = 8; [Br,Btheta] = magfield(theta,rho,phi,Bo,Rs); is how you ...

10 years ago | 0

| accepted

Answered
Error with popupmenu using GUIDE
handles = guidata(hObject); and guidata(hObjects,handles); are totally unnecessary where you use them. In this cas...

10 years ago | 0

| accepted

Answered
How to read file from excel in MATLAB
You need to give a full path including the drive. e.g. on my machine that would be: 'C:/users/...' It cannot find the...

10 years ago | 0

Answered
How do I use pre-defined data in *_CreateFcn calls in GUIDE?
I would say yes you have to do it from the OpeningFcn, but that doesn't mean all the code has to be in the OpeningFcn. My Ope...

10 years ago | 0

| accepted

Answered
Addlistener for slider in GUIDE for constant update
I usually add listeners and other things done to ui components in the OpeningFcn (or rather, a function called from that usually...

10 years ago | 1

| accepted

Answered
varargout isn't working for output from GUI when same formatting works just fine in similar GUI
Unless I am missing something you only assign 1 output argument (one cell array of two cells): handles.output={handles.valu...

10 years ago | 0

Answered
Abort roipoly in GUIDE
I've only really used impoly, imroi and similar before myself. They actually return an object representing the active polygon w...

10 years ago | 0

| accepted

Answered
How can I shift and repeat an element within a matrix?
idx = 3; n = 6; res = zeros(n); turnIdx = n * ( idx - 1 ) + 1; % 1 element after the end of the idx-1 row ...

10 years ago | 0

| accepted

Answered
How can I find the index and value of the smallest element within a range of values in a vector
vals( vals <= lowVal ) = NaN; vals( vals >= highVal ) = NaN; [val,idx] = nanmin( vals ); Seems to work but isn't ...

10 years ago | 0

Answered
Removing white pixels from background
Something like this should work, using an example image without anything inside the black rectangle, but that is irrelevant so l...

10 years ago | 0

Answered
How to save data from created guide?
What do you mean by 'always have access to it'? Do you mean actually 'always' or just for the duration of the GUI being open. ...

10 years ago | 0

| accepted

Load more