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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 1

Respondida
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, ...

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

Respondida
How to find first zero element per row in a matrix and set other elements to zero without loops
B = A; B( cumprod(A,2) == 0 ) = 0;

más de 11 años hace | 2

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

Respondida
How do I open a text file and extract the contents as a string?
doc textscan

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

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

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

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

más de 11 años hace | 0

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

más de 11 años hace | 0

Respondida
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,...

más de 11 años hace | 0

Cargar más