Réponse apportée
Using structfun with nested structures
You should be able to wrap it in an arrayfun. This is likely slower than using a for loop, as arrayfun tends to be, but if you ...

presque 10 ans il y a | 0

Réponse apportée
How do i get the editor window to open above the command window and not in a new separate one?
Just dock it and it should stay docked next time you open Matlab. There's a downwards arrow menu in the top right of the editor...

presque 10 ans il y a | 8

Réponse apportée
To generate square wave from array of zeros and ones
figure; stairs(x)

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Could I name a function "SPHERE" without conflict with the built-in function "sphere"?
Yes, you can. To be honest though you could have tested this in less time than it took to ask the question! (Assuming you are ...

presque 10 ans il y a | 1

Réponse apportée
How to increase maximum figure size?
myImage=rand(600,1800); cmap = flipud( jet(256) ); myImageIndices = uint8( myImage * 255 ) + 1 % Note - this is ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How displaying a matrix in its classical form ?
I assume you have a sparse matrix so: full( myMatrix ); should convert it to a normal matrix.

presque 10 ans il y a | 2

Réponse apportée
Subplot in loop just plotting the first y value?
Try this. I haven't tested it, just changed it off the top of my head, but the idea is what you want even if there are a couple...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Saving all handles behind current GUI as .mat using uiputfile style save dialogue?
'handles' is just a variable within the workspace of every GUI callback so you can just save it like you would any other variabl...

presque 10 ans il y a | 0

Réponse apportée
How to save to different column array
Y = [1 3 NaN 5; 2 NaN NaN NaN; 5 NaN NaN NaN; 6 NaN NaN 8] Y( :, sum( isnan( Y ) ) == size( Y, 1 ) ) = []; will remove the...

presque 10 ans il y a | 0

Réponse apportée
Deleting CreateFcn from GUI .m file
Yes, you can delete them, and I almost always do, but you must also clear the field in the corresponding graphics object within ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
May I know what does the following code do "uint8=>char"?
As far as I'm aware that is not valid Matlab code unless it is used in context somewhere related to file reading precision. Mor...

presque 10 ans il y a | 0

Réponse apportée
Legend for matrix plot
This works fine for me. Do you have a variable with the name 'legend' that is hiding the function? which -all legend wil...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
functions in different files
Sub-functions have file scope. If you want functions to be seen publicly they either need to be each in their own file or they ...

presque 10 ans il y a | 1

Réponse apportée
How to clear getappdata setappdata variables or workspace?
Did you look at the help pages? The 'See Also' section links to doc rmappdata

presque 10 ans il y a | 0

Réponse apportée
I have a 720x20 matrix how can i subtract 1x20 matrix from it?
res = bsxfun( @minus, out, minVal); should work if I understand correctly what you are asking. Don't ever call a variabl...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Saving & Loading GUI Data Entry & Results
doc savefig looks like the programmatic equivalent of saving a figure manually so if your GUIs are capable of communicating...

presque 10 ans il y a | 0

Réponse apportée
How do I get rid of the scientific notation when using get(gca, 'XTickLabel')?
If you are using R2015b or later, hAxes.XAxis.Exponent = 0; should ensure that you do not have scientific notation, where...

presque 10 ans il y a | 1

Réponse apportée
how to normalize this time sequence shown below?
Depends what kind of normalisation you want. If you want to normalise to a unit peak then just divide by the maximum of the s...

presque 10 ans il y a | 0

Réponse apportée
comparing plots with matlab
Depends how you want to compare them, but you can just normalise both and plot on the same graph if you want to remove the effec...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
with and without bracket
I didn't even realise mean SD is even valid syntax and from the example I have I can't work out what it is doing! m...

presque 10 ans il y a | 0

Réponse apportée
pixel based classification .
doc nlfilter should help for a 2d image. It contains an example for median. Mean, variance, etc will be similar.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Can I include functions from another .m-file in my application?
You can include functions from any file that is on your path. Only 1 externally accessible function per file though if you aren...

presque 10 ans il y a | 0

Réponse apportée
Why I have a bad quality in simple plot (none smoothing) ?
opengl info will tell you whether you are using hardware or software opengl rendering. If you are using software rendering...

presque 10 ans il y a | 7

| A accepté

Réponse apportée
How to store strings into array?
I wouldn't expect you to be getting that specific error, but strings need to be stored in a cell array, not a numeric array gene...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
What is difference between x='93'; and x=93; ?
x = 93 creates a numeric variable x = '93' creates a char variable containing a string. This should be very easy...

presque 10 ans il y a | 2

| A accepté

Réponse apportée
Alternative to 'ismember' for structures
any( arrayfun( @(x) isequal( B, x ), A ) ) should do the job I think.

presque 10 ans il y a | 2

| A accepté

Réponse apportée
How to do a SOBEL METHOD on image inside the axes in GUI MATLAB??
doc edge The second argument, 'method', allows you to specify 'Sobel' or other edge detection algorithms to use.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
MATLAB documentation claims that the output of rgb2ycbcr MATLAB inbuilt command is in the range [0, 1] for RGB input image of class double. However, its output is not in the mentioned range. Why?
The Matlab help makes a number of assumptions it seems when working with image processing. One of these being that if an image ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Regionprops fails to identify binary image - ERROR
The help says the input must be a logical array - i.e. type logical, not just 0s and 1s in any data type.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Using the struct function with a for loop
Something like for n = 1:89 fieldName = strcat( 'Node_', num2str( n ) ); Triangle_points.node_data.nodes.( fiel...

presque 10 ans il y a | 0

| A accepté

Charger plus