Réponse apportée
kmeans works with some values of k and not works with other
Surely in a binary matrix it wouldn't make any sense to have more than 2 clusters? You have a cluster of 0s and a cluster of 1s...

plus de 11 ans il y a | 0

Réponse apportée
Change x-axis with uicontrol slider
To answer your last post which should have been a comment rather than an answer: hax = plot(x,y) returns a handle to the l...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
hello guys,i have matlab version r2013a , i have a project image compression,and i am encountered a problem,its the "zigzag function",its not exist in this version or what? please any help for me,for use this function
I have no idea what zigzag is. It doesn't sound like a Matlab function and it certainly isn't in my version. By the way, blk...

plus de 11 ans il y a | 0

Réponse apportée
function within a gui set function
You can manipulate the string and apply that, but I would favour bundling your text box handles together into an array of handle...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Can I nest an if statement in a for loop?
Yes, you can put an if statement inside a for loop. Your syntax for the for loop is invalid though, not the if statement even...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how to image entirely a 3D file?
There are methods using e.g. doc surf doc slice http://uk.mathworks.com/help/matlab/visualize/overview-of-volume-visu...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
MATLAB error with indexing
Well, that is exactly what it does - it yields an error! Unlike C++ or Java or other languages you cannot chain together (or ...

plus de 11 ans il y a | 0

Réponse apportée
performing fourier transform an plotting magnitude and phase spectrum
doc fft doc Fourier Analysis

plus de 11 ans il y a | 0

Réponse apportée
Error with Guide opening
It's complaining precisely because you don't have a create function. If you go to the Property Inspector you will probably fi...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
function having plot command
Just call figure ahead of each call. Personally I always specify the exact axes I want to plot on in a plot instructi...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How can I connect buttons in GUI?
You need to attach your variables to the 'handles' structure in each callback. So, in one callback: handles.x = 3; hand...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Throwing MException subclass from MEX file
You could use mexErrMsgIdAndTxt( "MyProg:Id", "Somoething went wrong."); in the mex. Then in a wrapper function...

plus de 11 ans il y a | 0

Réponse apportée
Speeding Up Logical Operations
What does the profiler say about the speed of this? Is it the function that is slow or the number of times you call it? Wi...

plus de 11 ans il y a | 0

Réponse apportée
Do my Toolboxes work?
First you need to check if this class exists in your version. I suspect it does not since R2010a is quite old and class-based i...

plus de 11 ans il y a | 0

Réponse apportée
Use of pointers to structures
Matlab does not have the concept of pointers. You can use a class derived from handle to achieve this 'by reference' behaviou...

plus de 11 ans il y a | 0

Réponse apportée
round off to nearest 5 instead of 10
round( x / 5 ) * 5;

plus de 11 ans il y a | 10

| A accepté

Réponse apportée
Save image name as input from user
imagename = [answer '.tif'] if you just want to append .tif. Personally I would use uiputfile though rather than write m...

plus de 11 ans il y a | 0

Réponse apportée
What is the right OO implementation?
If you are going to write get and set function anyway then there is absolutely no point in making properties private. Just use ...

plus de 11 ans il y a | 1

Réponse apportée
problem in while loop?
You should be using b(:,j) = V(:,j) not n in your loop, which also should probably be a for loop, but that's a side issu...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
what is the handle for my uipanel, GUIDE
handles.panel1 I would imagine since it doesn't look like you changed its tag. I don't know anything about that waitbar su...

plus de 11 ans il y a | 0

Réponse apportée
How to create a new m file automatically with filled in commands every time?
What is the a=[x '.m'] type a delete x.m line of code trying to achieve? I do something similar to this to create a t...

plus de 11 ans il y a | 1

Réponse apportée
Scattering in a loop.
You get hundreds of figures because you are using the figure; instruction which will create a new figure for you every t...

plus de 11 ans il y a | 0

Réponse apportée
Adding a push button to a figure without using GUIDE
You have to specify the Units before the Position else default units of characters are used, meaning your push button will be mi...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How to plot multiple plots in a loop ?
for i = 1:3 figure(2*i - 1); plot( something ); figure(2*i); plot( somethingElse ); end

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
Ensuring same bins in image histogram
[counts,x] = imhist(___) should do the job so far as I can see. Of course your data with a range of 12000 will be spread o...

plus de 11 ans il y a | 0

Réponse apportée
How to save entire workspace?
Workspaces of functions? In the vast majority of cases only 1 function is ever running (and thus has a workspace) at any give...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Why use this syntax?
Personally I find it good practice to do the above, especially if the same thing is being used more than once. This is especial...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Error: Index exceeds matrix dimensions?
Before you do anything else and before I would even consider whether there are other problems in the code, you cannot name a var...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
Modify a running script, will it affect the running process?
Your running script should be unaffected by a change I think. I just did a very simple test though so I can't guarantee for any...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Get value from a struct
Change the function and instead of returning the structure pull the field you want out of the structure within your function and...

plus de 11 ans il y a | 0

| A accepté

Charger plus