Réponse apportée
MATLAB : dynamic variables not updated directly in the workspace
Why don't you just create an array instead of a sea of variables? ['x_',num2str(i))]= fonction(input); is not valid synt...

plus de 11 ans il y a | 0

Réponse apportée
How to assigned to a variable vector of the cell?
Please try to include information on any errors with questions like this. Just saying "without success" doesn't really make it ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
is there a way of scanning an array to find out what there is in there so i dont reinsert the same variable in there?
In response to your latest comment... C = setdiff(A,B,'rows'); should do what you want, assuming your pse array also has...

plus de 11 ans il y a | 0

Réponse apportée
Call on Dynamic Variable
Similar question, similar answer: http://uk.mathworks.com/matlabcentral/answers/183258-how-to-call-variables-with-consecutive...

plus de 11 ans il y a | 0

Réponse apportée
How do I interpolate a value from two sample vectors and two actual vectors?
>> g = griddedInterpolant( rpm, torque ); >> g( 1777 ) ans = 331.264 should do the trick. ...

plus de 11 ans il y a | 0

Réponse apportée
using parse to deal with input arguments
Does it not work to just replace isscalar(x) with something like validationFcn = @(x) isempty(x) || isscalar(x); ...

plus de 11 ans il y a | 0

Réponse apportée
piecewise function evaluation using if-else statement
You can't use an if statement on a vector (or rather you can, but it is usually not the effect you wish to achieve, as in this c...

plus de 11 ans il y a | 0

Réponse apportée
How to call variables with consecutive names?
Don't do it. Just use an array. It is what they are for. var(1), var(2), var(3), etc or if you have different sized va...

plus de 11 ans il y a | 3

Réponse apportée
How do i convert a .m file to a GUI
You can use Guide to create a GUI and then call your .m file function from a callback of a pushbutton or whatever control you wa...

plus de 11 ans il y a | 0

Réponse apportée
How does the cycle for , if work?
K=[-2,5,-5]; n = 0:10' res = bsxfun( @plus, K, n' ); resSum = sum( res, 2 ); zeroSums = resSum == 0; n( zer...

plus de 11 ans il y a | 0

Réponse apportée
Black image getting saved while using imsave
Just scale it up to use the full 16-bit range before you save it. i.e. multiply by 65535/957 but replacing the hard-coded ...

plus de 11 ans il y a | 0

Réponse apportée
how to write code to find y???
y = [-1 1] .* sqrt( x - 2 ); This is maths rather than Matlab though. Once you rearrange the equation the Matlab code for ...

plus de 11 ans il y a | 0

Réponse apportée
Error using vertcat (dimension of matrices concatenated are not consistent)
z0 is an array of values because w is an array of values. So it is not a scalar and cannot therefore be concatenated as: ...

plus de 11 ans il y a | 0

Réponse apportée
is there a way of scanning an array to find out what there is in there so i dont reinsert the same variable in there?
find( myArray == newNumber, 1 ); If that returns true the number is already there, if not it isn't.

plus de 11 ans il y a | 0

Réponse apportée
Interp1 error - grid vectors are not strictly monotonic increasing.
The data in your data sets must be in a strictly increasing order - i.e. each element must be strictly greater than the previous...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to make values global in matlab gui?
Your code will allow handles.folder = 'myfolder'; to be accessible in any callback. The code you wrote after that is ju...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Placing 2 related GUI's
Launch your second gui as: hFig2 = SecondGUI; set( hFig2, 'Position', [x y width height] ); where [x y width height] ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
output tic/toc functions ?
The documentation says it returns time in seconds. I only ever use tic toc for an approximate idea of time though and usually...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I execute this script as a function?
set( hPushButton, 'Callback', @(src,evt) func( allf ) ) where you create the pushbutton (obviously you can just add it to t...

plus de 11 ans il y a | 0

Réponse apportée
finding if a digit repeats itself an equally at 2 different numbers
r = ~x should do the trick if x is the difference that can be 0 or greater

plus de 11 ans il y a | 0

Réponse apportée
gui run command only if another input has been done
Do you mean you want to run the command when you press pushbutton2? In which case just put it in the callback for pushbutton2. ...

plus de 11 ans il y a | 1

Réponse apportée
How to store every iteration points of GA in m-file?
<http://uk.mathworks.com/help/gads/ga.html#outputarg_output> seems to be the output argument you need. I don't have the opti...

plus de 11 ans il y a | 0

Réponse apportée
Simple question about sum function
X = 1:10 Y = X + 1; sumRes = sum( Y ); for e.g. X from 1 to 10

plus de 11 ans il y a | 1

Réponse apportée
How to preallocate memory for building this structure, indexing fieldnames?
Why do you need to pre-allocate? Aren't you simply copying values from one struct to another without any dynamic resizing going...

plus de 11 ans il y a | 1

Réponse apportée
Why the error: Assignment has more non-singleton rhs dimensions than non-singleton subscripts???
matrice(60,10,t) is just a single element of your array that you are trying to assign to. matrice(:,:,t) = ... ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Cell contents assignment to a non-cell array object?
tester = (round(NumberOfElementsInBigMatrix/2)); will create *tester* as a double array. Then later on you try to assign t...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
accessing data from handles structure from a call back fuction
You need to add guidata( hObject, handles ); at the end of your pushbutton1_Callback. Then in pushbutton2_Callback yo...

plus de 11 ans il y a | 0

Réponse apportée
How can I select a default folder?
I just change the 'Start in' directory in the properties for Matlab for the shortcut I use to open it.

plus de 11 ans il y a | 0

Réponse apportée
All Indices of all Numbers in Array
maxElem = max( A(:) ); res = cell( maxElem, 1 ); for i = 1:max( A(:) ) res{i} = ceil( find( A' == i ) / 3 ); end ...

plus de 11 ans il y a | 0

Réponse apportée
Please help, logical indexing of 3D matrices
(Edited version as in comments below - original edit was incorrect!) C = zeros( size(B) ); ind2d = find(B); C( in...

plus de 11 ans il y a | 0

Charger plus