Réponse apportée
How to save a new modified colormap ?
filename = 'C:\Me\colourmaps\myColourmap.mat'; save( filename, 'mycmap' ); Obviously filename is whatever you choose it ...

presque 10 ans il y a | 0

Réponse apportée
Listbox and Pushbutton in GUI
You should never call one uicontrol's callback from inside another one and certainly not passing down the hObject of the first o...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Subtracting two matrices of different size element by element
A(1:690) - B; will work without giving you errors, but quite why you would be in a situation where you want to subtract vec...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to store values in a vector?
Vet = [5 9 repmat( [1+3, 3+4, 5+6], [1 3] )] will give you that specific vector. For a more general case it depends what y...

presque 10 ans il y a | 0

Réponse apportée
Filter a struct based on the field name.
names = fieldnames( myStruct ); subStr = 'f1_'; filteredStruct = rmfield( myStruct, names( find( cellfun( @isempty, strf...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Index exceeds matrix dimensions. Error in GUI
Are you actually passing the data into the subGUI when you launch it? e.g. subGUI( data );

presque 10 ans il y a | 0

A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

presque 10 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

presque 10 ans il y a

Réponse apportée
How to use the string of a variable as a new variable name?
Why would you ever need the name of a variable to change during an iteration? A variable name is just a handle to the variable,...

presque 10 ans il y a | 1

Réponse apportée
How to take the X smaller values of an array ?
[y,idx] = sort( x ); [~,idx2] = sort( idx(1:6) ); y = y( idx2 ); There may be a slightly more elegant way, but that d...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Passing the input argument to the class
If your class constructor takes arguments then just [a, b, c] = getdata( datalength, stringlength ); myObj = myClass( a,...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Cell contents assignment to a non-cell array object
main is declared as a struct so yes, you would get that error if you are trying to assign to it as though it is a cell array whi...

presque 10 ans il y a | 0

Réponse apportée
Meaning of ~isempty()
~ means NOT so *isempty* tells you if the vector is empty and *~isempty* tells you if the vector is _not_ empty.

presque 10 ans il y a | 11

| A accepté

Réponse apportée
how to load a file from different folder than our m. file?
Use the following syntax [FileName,PathName,~] = uigetfile(FilterSpec) then filename = fullfile( PathName, FileName...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Indices of a maximum value in a multidimensional matrix.
[maxVal, idx] = max( myMatrix(:) ); [x, y, z, w] = ind2sub( size( myMatrix ), idx );

presque 10 ans il y a | 0

Réponse apportée
How can i connect different points using straight line after plotting? is there any plotting tool?
How did you plot your points? The plot or line functions will, by default join points with a line.

presque 10 ans il y a | 0

Réponse apportée
Hardcoded Integers in C code generated by Matlab Coder
I would imagine they are 'epsilon' type parameters that are there to catch situations where you would end up dividing by zero or...

environ 10 ans il y a | 0

Réponse apportée
Parfor possible, though iterations depend
k is not involved in your parfor loop at all so each worker will just create its own List variable and doesn't care about the fa...

environ 10 ans il y a | 1

Réponse apportée
How to get an output from a callback function?
If you want to get into using object-oriented programming you can do something like this: Define a class derived from handle ...

environ 10 ans il y a | 0

Réponse apportée
About the Number property of figure function
'Number' is a read-only property. You can call: hFig = figure( 3 ); set( hFig, 'Position', [9 39 900 300], 'Name', 'Velo...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
subscript indices must either be real positive integers or logicals( X_re(k_r)=XD(1,kd); can anyone help me why i am getting this error
At a glance N/d is 1024 / 28 which is not an integer so I imagine k_1=[k_1,kd+(hhh-1)*N/d]; produces non-integer values ...

environ 10 ans il y a | 0

Réponse apportée
Why is graphics object not being passed by reference in nested functions? (gobjects array loses values when function closes)
The array of GraphicsPlaceholder objects is not passed by reference, it is the objects themselves that would be passed by refere...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Calculate value based on previous row plus adjacent row
For that particular example: B = cumsum( A )';

environ 10 ans il y a | 0

Réponse apportée
Multiple element at same index
Use a cell array if you really want to do this i.e. y = { 0, -4, -2, [0 2 4], 0 }; Be aware though that using cell array...

environ 10 ans il y a | 0

Réponse apportée
Clear all workspace except variables use in GUI
Why don't you just use a function instead of a script? GUIs and scripts are not a great mix in general. Also, this is one of...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Axis equal plot in multiple axes GUI
The documentation for the axis equal command states that the following axes properties change: 'Sets DataAspectRatio ...

environ 10 ans il y a | 0

Réponse apportée
Radio button to ON-OFF figure visibility
Right click on your radio button group panel (you should put radio buttons in a button panel if they aren't already) and select ...

environ 10 ans il y a | 0

Réponse apportée
linkdata to structured data
You can set the 'XDataSource' and 'YDataSource' of the line object to e.g myStruct.a and myStruct.b (never call a struct 'struct...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Quantizing a grayscale image into 256 levels
In your case, assuming the values are still in the desired [0 255] range then just rounding and/or casting to integers is the be...

environ 10 ans il y a | 0

Réponse apportée
Given the variables how can i repeat a formula multiple times
For a start, lose the variables a_1, a_2, etc. Use an array, a, of all of them. Likewise with b and the same with the result i...

environ 10 ans il y a | 0

Charger plus