Answered
Matlab issue: Nested while loop paradox
Fraser - just initialize the error *epsilon* to some value that is greater then *R* so that the condition epsilon > E is...

10 years ago | 0

| accepted

Answered
Matlab does not recognize the hasFrame for input type VideoReader
isaironi - according to <http://www.mathworks.com/help/matlab/ref/videoreader.hasframe.html hasFrame>, this function was introdu...

10 years ago | 3

| accepted

Answered
I've got an error message: Undefined variable x when I call up function Hessian in Matlab
Hmissi - from the command line, you would call this function as (at the very least) H = dcc_hessian(f,x,N) where *f*, *x*...

10 years ago | 0

Answered
Performing audio energy calculation from gui.
Sarah - it looks like your code for the energy calculation is in a script. Is that the case? If so, you could just convert it ...

10 years ago | 0

Answered
how can i replace white pixel (in binary image) with a color pixel of another image?
bay rem - what are the dimensions of *rgbimage* and *b*? Presumably the former is mxnx3 (since RGB) but is the latter two- or t...

10 years ago | 0

Answered
movie from matlab plot saved in .png format
swamp - consider using the <http://www.mathworks.com/help/matlab/ref/videowriter.html videowriter> object to create your movie f...

10 years ago | 0

Answered
Error when asking if a certain option is valid
Garrett - consider using the MATLAB debugger to <http://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features...

10 years ago | 0

Answered
I' trying to find the mode of an input vector without using the built in mode function. I'm attempting to search said vector and add a count to a vector of zeros everytime it finds a certain number. Am i on the right track with this?
William - are you assuming that your input vector has only positive integers (i.e. integers greater than zero)? If that is the ...

10 years ago | 0

Answered
How can I write a method that will check if the letters in a string are all the same?
George - use the <http://www.mathworks.com/help/matlab/ref/unique.html unique> function to find the unique characters in the str...

10 years ago | 0

Answered
Setting .m file to Radio Button in GUI Creator
Using GUIDE (which is presumably what you mean by the _built-in MATLAB builder_, create a button group panel and create the four...

10 years ago | 0

| accepted

Answered
how can i convert RGB image to YCBCR image
si - what can you tell us about the input parameter *a*? What are its dimensions? According to the documentation for <http://w...

10 years ago | 2

Answered
I'm analysing this code for a calculator here and I noticed 2 bugs. Any insight would be heplful.
C - look closely at your *evaluate* function and in particular the code that creating the string (of numbers) to display in the ...

10 years ago | 1

| accepted

Answered
Creating an interactive 3D bar graph
Daniel - have you written the callback *updateSystem*? The error message is telling you that the function is either undefined o...

10 years ago | 0

| accepted

Answered
i am trying to find the absolute relative error of an iteration and i cant get it to work.here is my code.my equation seems to give me wrong results and then i cant get the switch statement to work.what am i doing wrong?
aristi - I don't understand the condition in your *while* loop e > tol && i==x_max You want to continue to do something (...

10 years ago | 0

| accepted

Answered
index exceeds matrix dimension
Debashis - please use the MATLAB debugger to understand where in the above line of code the error *Index exceeds matrix dimensio...

10 years ago | 0

| accepted

Answered
plotting shapes in matlab
Mahmoud - as this is a homework assignment, we can only give hints on how to proceed. In this case, break the star down into it...

10 years ago | 0

| accepted

Answered
Error in MATLAB Too many input arguments
Debashis - the error message *Too many input arguments* is telling you that you are calling a function and trying to pass it mor...

10 years ago | 0

| accepted

Answered
I have a variable 'n'. I want n to take a value 1 or 2 randomly. how do i code it?
Aanandita - use <http://www.mathworks.com/help/matlab/ref/randi.html randi> to generate a random integer between 1 and a maximum...

10 years ago | 0

Answered
hello i need base code (triu) for gauss elimination
masoud - <http://www.mathworks.com/help/matlab/ref/triu.html triu> returns the upper triangular part of a matrix so it is should...

10 years ago | 0

| accepted

Answered
how do i determine the output of how many prime numbers are there and list them by the function that i created?
Rather than have your function *MyPrime* output strings indicating whether the number is prime or not, consider changing the out...

10 years ago | 0

| accepted

Answered
Output argument "D" (and maybe others) not assigned during call to "E:\PRO\NNEWPTR\MRG.m>MRG".
Debashis - if you put a breakpoint in your function *MRG*, call it, and then step through the code using the debugger you will p...

10 years ago | 1

| accepted

Answered
How do I use plot command in GUI?
Thomas - since you are plotting individual points, try changing the line width to make the point appear larger plot(sim_time...

10 years ago | 0

| accepted

Answered
Showing timer function inside GUI
Austin - what time are you trying to show? The current time or the elapsed time? In the above code, t = timer(... *t* ...

10 years ago | 0

Answered
How to continuously update the variable when input given by user?
Usman - initialize *R* as a cell array and then update each element of that cell array on each iteration of the *for* loop. Som...

10 years ago | 0

Answered
Problem while using encoding an image file with cyclic code
amit - is the *encode* function something that you have written or is it from the *Communications System Toolbox*? If the latte...

10 years ago | 0

Answered
how to seek and replace characters on cell
Rather than converting the matrix to a cell array using *mat2cell*, consider applying a function to each element of *A* using <h...

10 years ago | 1

| accepted

Answered
Index exceed matrix dimension error
Leticia - the error message *Index exceeds matrix dimensions* is telling you that the code is trying to access an element within...

10 years ago | 0

Answered
How to check a repeat value inside a for loop?
Marinna - you could create an array to keep track of which cases have been chosen. For example, you could keep track of the sta...

10 years ago | 0

Answered
User input that can remain on screen and be adjusted?
Matt - if you want to re-populate your input boxes with the list that the user had already selected then you can by making use o...

10 years ago | 0

| accepted

Answered
Global Optimization toolbox: "Undefined function or variable 'createOptimProblem'"
Nam - do you have the *Global Optimization Toolbox*? In the Command Window, type ver to list your version of MATLAB and ...

10 years ago | 0

| accepted

Load more