Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 1

Réponse apportée
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, ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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 ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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;

plus de 11 ans il y a | 2

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I open a text file and extract the contents as a string?
doc textscan

plus de 11 ans il y a | 0

Réponse apportée
How to count the number of recursive calls
Keep incrementing a counter and pass it down into the function as an argument.

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 1

Réponse apportée
how can divide vector with some function like that
vector2 = vector1(1:2:end); vector3 = vector1(2:2:end);

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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,...

plus de 11 ans il y a | 0

Charger plus