Answered
Creating a ring of stars like a flag
James - this seems like a homework question, so I will just give you a hint. You want twelve equally spaced stars around a circ...

11 years ago | 0

| accepted

Answered
Shannon fano in matlab
Maheen - one problem is with the way that you are computing the probabilities. I think that you need to determine the unique ch...

11 years ago | 0

| accepted

Answered
Forcing GUI to wait for user to select a file
TastyPastry - you shouldn't need to pause execution of your GUI since <http://www.mathworks.com/help/matlab/ref/uigetfile.html u...

11 years ago | 0

| accepted

Answered
Can any one help me to fix error with imread()?
Nilima - it sounds like you don't have read permissions for this file (though is *imgs* the correct name for it?). To find out,...

11 years ago | 0

Answered
Printing answers in a word doc
Fabiano - while you have given the extension of *doc* to your file, it won't be a Word document that you are creating but just a...

11 years ago | 1

| accepted

Answered
Error Message: Function definitions are not permitted in this context
Bill - this error message typically indicates that you have an m file that begins with some code outside of a function definitio...

11 years ago | 0

Answered
Changing code into a loop
James - just use a local variable to store the turn angle, and update it on each iteration of the *for* loop. Try something lik...

11 years ago | 0

Answered
Plot Taylor series for cos?
Abdullah - what do you want to plot? The sum at each iteration of the loop so that you can see the Taylor series converge to th...

11 years ago | 0

Answered
i want to plot a square wave
Abduladeam - in order to get the square wave, you will have to sum over the odd *k* (which is missing from your above equation)....

11 years ago | 0

Answered
I'm writing my Rsquared values onto a scatter plot but they don't appear on the correct suplot!
Olivia - the problem may be because you are not specifying which axes to write the <http://www.mathworks.com/help/matlab/ref/tex...

11 years ago | 0

| accepted

Answered
Use MATLAB to calculatethe following and show at least 7 digits from the output:
Salah - the above homework question seems pretty straightforward. If you are getting stuck on how to show the number of decimal...

11 years ago | 0

Answered
How to update Axes LineStyle Order in Matlab Gui
Ravi - is the *LineStyleOrder* of the axes that you wish to change or the *LineStyle* of the curve plotted within the axes? I t...

11 years ago | 0

Answered
How do I store and multiply new matrix value in loop
mohd - you can use two variables to keep track of *R* from the previous iteration and the one for the current iteration. The fo...

11 years ago | 0

Answered
how to do the coding with plus minus sign infront of square root?
amanina - the plus/minus means that you will have two values to the above: one which is positive (plus) and one which is negativ...

11 years ago | 1

Answered
Taking the median of the same matrix index over a series of matrices
Manu - consider using <http://www.mathworks.com/help/matlab/ref/cat.html cat> to concatenate the three matrices into a 3D array ...

11 years ago | 0

| accepted

Answered
fft of set of data points in csv file
Shyam - use <http://www.mathworks.com/help/matlab/ref/csvread.html cvsread> to read this one second's worth of data from the fil...

11 years ago | 0

Answered
beginner question for .m conversion
Mohamed - the code to increment a local variable by one would be the same in MATLAB. Just do x = x + 1;

11 years ago | 0

Answered
Need help understanding the popup menu in GUI.
Matt - use the *Value* property of the pop-up menu control to set and get the index of the selected item. For example, to defau...

11 years ago | 0

| accepted

Answered
I am getting this error "Attempted to access a(2); index out of bounds because numel(a)=1. Error in generateShare (line 16) a2 = a(2);" after running the following code
juhi - the error message is telling you that you are trying to access an element of the array *a* using an index that is invalid...

11 years ago | 0

Answered
How to combine vectors based on value?
Do you wish to simply iterate over each element in the first row of *C* and, for those that are non-zero, check to see if it exi...

11 years ago | 0

Answered
hi, I'm trying to solve an enlarge image problem. I need to enlarge image 1.7*x and 1.3*y But I'm getting error as
Halil - the error messages makes sense since the code is trying to access elements within the array *B* using non-integer indice...

11 years ago | 0

| accepted

Answered
Code for a simpson's rule approximation of the integral of sin(x)/x
Evan - it isn't clear to me where you are performing your sums for each iteration of either loop. I see that you are setting an...

11 years ago | 0

Answered
Return the output of an eval function
Jesse - perhaps try using <http://www.mathworks.com/help/matlab/ref/system.html system>. You may be able to do something like ...

11 years ago | 1

Answered
I need to create a program that will add consecutive odd numbers until they reach a user defined value. I then need the last number added to be displayed.
Mallory - see <http://www.mathworks.com/help/matlab/ref/for.html for loop> for example of how to use a *for* loop. Pay particul...

11 years ago | 0

Answered
How do I do this
Aaron - the idea is to iterate over each column and determine which element/value is the smallest. You need to keep track of th...

11 years ago | 0

Answered
Global Variables in GUI
Adam - since you are creating your GUI programmatically, try nesting your callback within the "parent" function that creates the...

11 years ago | 0

Answered
Slider using GUI in matlab (Image processing)
José - I think that the problem is that your slider callback is receiving an outdated *handles* structure each time that it is c...

11 years ago | 2

| accepted

Answered
Printing out a variable in while loop?
Nick - your answers come out the same since you are writing out the same variable for each print statement: fprintf('The act...

11 years ago | 0

| accepted

Answered
Controlling number of Characters typed into Edit Box using KeyPressFcn
Kah - I think that part of the problem is that the *String* property of the edit text control is not updated until focus is set ...

11 years ago | 2

| accepted

Answered
Sipmson's rule in Matlab
Ollie - I think that you almost have the correct implementation for Simpson's algorithm, but you may want to reconsider how you ...

11 years ago | 0

Load more