Answered
While function must have correct input in order to continue
Why don't you just enforce a valid input to the function in the first place? Is it a requirement to allow the function to be ca...

11 years ago | 1

| accepted

Answered
How does interp1 work?
Default interpolation is linear. If you add in 3 points between every pair of points and then linearly interpolate you will jus...

11 years ago | 1

Answered
Saving to a vector
You can replace b = i; with b = [b i]; to create an array. You will get a warning about it resizing in a loop, ...

11 years ago | 0

Answered
Error when running a script: 'Index exceeds matrix dimensions.' Help
The index 'Endidx' presumably exceeds the size of the 2nd dimension of EEGtraces. It is indexing into that matrix that is causi...

11 years ago | 0

| accepted

Answered
setting initial text in uicontrol popupmenu
Use the TooltipString property of the listbox to provide the hint. If selections are as obscure as just 1-5 though ...

11 years ago | 0

| accepted

Answered
GUI listbox example file of matlab: A structure 'handles' is being used throughout although it hasnt been defined in the program? I don't understand how is this happening?
A GUIDE-created UI will always have a handles structure embedded in it which is passed to every callback and which stores the ha...

11 years ago | 0

Answered
Matlab OOP, dependent class properties, correct coding techiques
The usual solution to that is to make A dependent, not C. It is a less common usage of dependent properties to make use of the ...

11 years ago | 0

Answered
Is it possible to AUTOmatically assign a title right next to each curve in a multiple plot figure ?
doc text allows you to put text on axes. You have to position it yourself, but that should be easy enough since it will be...

11 years ago | 1

| accepted

Answered
Save and close figure in Matlab
doc savefig Although quite why you would want to save 1000 figures is another matter. You could just produce the figures o...

11 years ago | 0

Answered
How can I create a program that allows the user to enter a matrix of any size and replaces only the negative values in the matrix with -100?
x( x < 0 ) = -100; will replace negative values of x with -100. Allowing a user to create a matrix depends how you want to...

11 years ago | 0

Answered
MATLAB fft speed with and without padding
20,833,339 only has two prime factors, one of them very large. 20,000,000 has just 2 and 5 as its prime factors so according to...

11 years ago | 0

Answered
how can i make a growing time vector, that fits my data vector?
Can't you just plot( (0:(i-1), Data ) instead?

11 years ago | 0

Answered
Plotting column of a matrix from a string.
plot( loadedContent.( plotsall )(:,1) ) seems to work. I wasn't aware it could be done because usually Matlab doesn't su...

11 years ago | 0

| accepted

Answered
How to count the number of recursive calls
Keep incrementing a counter and pass it down into the function as an argument.

11 years ago | 0

Answered
Will Addon Modules work with all versions of matlab?
Toolbox versions only work with a specific version of Matlab so when you upgrade Matlab you also upgrade the toolboxes to work w...

11 years ago | 0

| accepted

Answered
Constructor not working, preallocating object leaves object with no properties
Are you sure it has no properties? If it is a protected property you have then you will not be able to see it when you display ...

11 years ago | 1

Answered
how can divide vector with some function like that
vector2 = vector1(1:2:end); vector3 = vector1(2:2:end);

11 years ago | 0

Answered
MATLAB : update plot with a pushbutton
If you simply want to know how to get a value from an editbox then: newVal = str2double( edit.String ); (Don't call your...

11 years ago | 1

| accepted

Answered
how to read all files that match certain names
Whatever logic you used on your datelist variable to separate out weekend days should come with a set of indices for these. Jus...

11 years ago | 0

| accepted

Answered
Finding the time constant
doc find This will give you the index of the x value matching a given condition such as y == 37.

11 years ago | 0

| accepted

Answered
MATLAB : access to the callback function of checkbox
Factor out your checkbox callbacks to something like this: function checkBoxCallback( hCheckbox, ind ) if ( logical(...

11 years ago | 0

| accepted

Answered
Problem during a while loop
col = find( ped_form2(1,:) >= ped, 1 ) should work in-place of your internal while loop if I understand it correctly. I ha...

11 years ago | 0

| accepted

Answered
Simple question with string
strcat( str1(1:4), 'b', str1(5:end) ) will do the job, amongst other alternatives, with the obvious generalisation of repla...

11 years ago | 0

| accepted

Answered
Matlab Gui Help request !!
You should probably ask questions in different threads when you have so many to ask. Asking 4 different questions at once means...

11 years ago | 0

| accepted

Answered
Error Message in uitable GUI
There's a CellEditCallback in which you can add whatever code you want in response to someone entering something in a cell of th...

11 years ago | 0

Answered
Attempt to reference field of non-structure array in GUI callback?
I assume that length_et is not a field on your handles struct. What is it supposed to be? Judging from the syntax I assume i...

11 years ago | 0

Answered
how to implement OO design using structs?
I can't imagine why your client would not want to use classdef, but my own personal advice is that I would strongly advise again...

11 years ago | 0

Answered
how come edit box joins text together even when max - min >1
This should work: str = get(hObject,'String'); [nLines, nCols] = size( str ); result = str2double( mat2cell( str,...

11 years ago | 0

Load more