Answered
Why am I getting "Index in position 1 exceeds array bounds."?
Your image is already rgb, so you can skip that line in the first place. You do need to convert to double to have the same resul...

8 years ago | 1

Answered
How to get the right axes current point in a GUI after clicking on a pushbutton
Since you don't already use the axes callback, I have modified your example so it will ignore all clicks outside the axis (and o...

8 years ago | 0

| accepted

Answered
How to fit curve to see the scaling
That code doesn't work, because your data is not a polynomial. It doesn't make sense to fit to a polynomial if your data is not....

8 years ago | 0

| accepted

Answered
Creating a polar plot in a Matlab GUI (using GUIDE)?
You can create a polaraxes object (take care to specify appropriate position parameters), and use the handle to that polaraxes o...

8 years ago | 2

Question


Is discussion of cryptography allowed?
The answer seems to be that it isn't, but the resources are pretty confusing. My legal background is limited to two courses in D...

8 years ago | 3 answers | 1

3

answers

Answered
hobject issue with function
I'll post it as an answer so you can accept it. The root cause of your problem is that your call in blocproc assumed that a han...

8 years ago | 0

| accepted

Answered
Same bins for histogram
What you are telling Matlab is to divide the range [min(data) max(data)] in 10 equal parts. Because your data has differing rang...

8 years ago | 0

Answered
Matrix value to store as matrix index
The code below works. I'll try to find a better way, but in the meantime you can use this. A = [2 2 1 1 1; 3 3 3 0 2; 5 4 5 0 3...

8 years ago | 0

| accepted

Answered
how to get only selected legend in this particular case
Using explicit handles to the patch objects will fix the legend for you. Also, you don't need the second call to hold on. The la...

8 years ago | 0

| accepted

Answered
Need some help with the codes
You are almost correct. If you look at the sidebar you will see several m-lint warnings. The solution is to actually return a -1...

8 years ago | 0

Answered
write multiple txt files
A few lines later you try something better when you try to form a file name. But the problem is a bit deeper: you are trying to ...

8 years ago | 1

| accepted

Answered
Index exceeds matri dimensions
This has to do with your loop and with the way Matlab parses the || operator. You loop goes to length(estimulo), but then you t...

8 years ago | 0

| accepted

Answered
How do I work on images with desired range of brightness. DICOM
I don't think you understand what is happening when you execute that line of code. Have you read the documentation for imshow? T...

8 years ago | 2

Answered
How can I create an array starting from one time and ending at another time in one secod interval?
If you specify the step size it should work: starttime=datetime(0,0,0,0,1,50); endtime=datetime(0,0,0,0,2,0); v=starttime:sec...

8 years ago | 0

| accepted

Answered
I have a loop that creates random sequences of strings. I need to save this into a matrix so that I can make sure that none of the lines repeat. How can I take the sequences I make in this loop and save it in a matrix?
You can use something like the function below. function seq=Random_Sequences(sequence_length,Num_sequences,Num_N) %each row of...

8 years ago | 0

| accepted

Answered
How do I create an image from random unsorted x, y, intensity values?
In the code below I'm assuming x and y are valid sub-indices. figure(1),clf(1) %set a function we'll need later rot90CW=@(I...

8 years ago | 1

Answered
Inspired after seeing a cool Youtube video of Fourier series... How do I implement a Fourier series for an irregular non periodic curve?
First I misunderstood it a bit: I just let Matlab figure out the desired wavelenght as well, but that turns out to be quite tric...

8 years ago | 0

| accepted

Answered
can develop this answer to print ('no hole') if the condition of the number of zeros is not satisfy ,please?
It is a bit redundant, but here is the code I was refering to: x=[1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0...

8 years ago | 0

| accepted

Answered
Alternative command to Shell Escape [!] function
On Windows you can use the start keyword to start a command in a separate thread. Sometimes this doesn't play nice with Matlab,...

8 years ago | 1

Answered
Why running GUI via double click on a .fig file makes handles be empty?
The fig file is just a figure, and does not contain any code. So opening the figure does not start your GUI, it only opens that ...

8 years ago | 1

| accepted

Answered
I have large matrix and i want to find the number of consecutive zeros if there is more than 10 disply(hole) and give the index of the start and end of this vector of zeros,
Use this FEX submission if you want to speed up this code. x=[1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2...

8 years ago | 1

Answered
How can I raise a power in gui edit text
There is not a lot of support for rich text formatting in Matlab. I don't really know any editable field where you can use it. ...

8 years ago | 1

Answered
Find the alphabetic word product
See the code below for some more guided hints in an almost finished form. You don't need to call the input function btw. You can...

8 years ago | 0

| accepted

Answered
how to fit segmental regession with matlab
Actually, you are fitting the intersection point as well. The code below is not guaranteed to result in a continuous function, b...

8 years ago | 0

| accepted

Answered
How can I determine is (x,y) pair is inside an orthogonal area?
Your else statement is only reached in the inner part. If you want to use this structure, you should do the following: x = [1, ...

8 years ago | 2

| accepted

Answered
Automatically update a checkbox in list
You mean you want to run some code when the box is clicked? That can be done with the callback property. You can set the Callba...

8 years ago | 0

| accepted

Answered
How to create large figure from GUI axes?
Many functions that place content in an axis will reset a lot of properties. As an example: imshow will wipe most properties of ...

8 years ago | 1

Answered
Matlab student licence for non institution student
You are only allowed to use the student licence if you are a student. The definition of 'student' in this context is not always ...

8 years ago | 0

Answered
How to solve Function 'subsindex' is not defined of class 'strel'
You have overwritten the function imdilate with a variable imdilate. So now, the second time your code gets to that line it trie...

8 years ago | 1

| accepted

Load more