Community Profile

photo

Geoff Hayes


Last seen: Today
3.090 total contributions since 2014

Professional Interests: Software Engineering, Target Tracking, Video Streaming apps

Geoff Hayes's Badges

  • Revival Level 3
  • First Review
  • 36 Month Streak
  • Thankful Level 1
  • Ace
  • Knowledgeable Level 4
  • First Answer
  • Scavenger Finisher
  • Promoter
  • Solver

View details...

Contributions in
View by

Answered
Fix axis on plot
Benjamin - I'm not entirely sure this is what you want, but I think that you need to find the minimum and maximum across all x a...

4 días ago | 0

Answered
I'm keep having an error 'Not enough input arguments' for this code
Muhammed - from the function signature function [y] = DivisibleTest(M) when calling this function, you need to provide an inpu...

4 días ago | 0

Answered
Can't reach line object from callback function - 'Invalid or deleted object.'
Fredrik - I suspect the problem is here guiobj.chkbox(k) = uicontrol('Parent',guiobj.f,'Style','checkbox','String',Names(k),...

4 días ago | 0

| accepted

Answered
For - While loop output and extracting the value of computed rows from a column
Christopher - look closely at this code for qq = [1:5] while cumulative_sum <= C cumulative_sum = cumulative_sum ...

6 días ago | 1

| accepted

Answered
confusion while; break; continue.
Blazhe - I think the condition on your while loop is preventing you from entering the body (of the loop) and so preventing the c...

6 días ago | 0

| accepted

Answered
In a 'for loop' not getting difference of two consecutive iteration
feeroz - you never update your x, y, and z after their initialization, so perhaps you are intending to use X_i instead. Try the ...

6 días ago | 0

| accepted

Answered
How do I use function for a function which has a matrix with variable index?
Fidele - since your function signature is function [a,b,c] = trial_function(num) then you need to assign values to each of th...

6 días ago | 0

Answered
Calling a function in bisect.m
Rashi - try removing (in the hw7p2.m file) the @ in front of the function handle that you are passing into the bisect function....

8 días ago | 0

| accepted

Answered
Animating a pendulum: error in code
In order to convert to a series of frames and save as an AVI, just do % open the video writer v = VideoWriter('pendulum.avi');...

8 días ago | 0

Answered
Creating GUI for .m configuration file
Muhammed - is your m file a function or a script? How many parameters do you have? It may be easier to use an inputdlg to gather...

9 días ago | 0

Answered
How to save wave file with arbitrary name right after recording is finished.
Dao - perhaps you want to try something like [newfile,newpath] = uiputfile('my_new_name.wav','save file name'); if isstring(ne...

12 días ago | 0

| accepted

Answered
missing/incorrect use of math operators?
Jocelyn - why should the time of flight value be increasing in value? Is it because it is dependent upon the previous value? Do ...

12 días ago | 0

| accepted

Answered
How to get answers in a matrix form
Houman - if we assume that the result of trapz is a scalar, then you could do something like trapzResults = zeros(size(yval,2),...

13 días ago | 1

| accepted

Answered
Editing Text Strings through Looping
James - you could use sprintf to create your url with the "code" for code = [587 612 876 296 137 635 591] url = sprintf('h...

15 días ago | 0

Answered
How to Plot on UI Axes with app designer?
Cameron - from hold, try replacing your line of code hold on; with hold(app.UIAxes, 'on'); where you specify which axes you ...

15 días ago | 2

Answered
Format long error in function
ahmed - consider using fprintf and specifiying the number of integers to the right of the decimal point that you are interested....

15 días ago | 0

| accepted

Answered
Running three different cases in my function and plotting three graphs on one plot (figure)
Asaf - try using hold to retain the current plot when adding new plots. For example, x = -2*pi:0.01:2*pi; plot(x, sin(x)); ...

16 días ago | 0

Answered
If I have a string with both numbers and letter in it, how would I get the value at a column, and if it is a number convert it to not a string?
Jared - perhaps I'm misunderstanding, but if you have a comma-delimited string, you can split on it and then use str2double to c...

16 días ago | 0

Answered
Redrawing an image in a UIAxes that has already been drawn
Hi Jason - from image created by imshow, the app.myData is an image object which (from the tests I did) may no longer be valid d...

alrededor de 1 mes ago | 0

| accepted

Answered
Removing the max and min of a vector without removing multiple minimums or maximums
Logan - from max value and indices you can get the index to the maximum (or minimum) value and then use that index to remove the...

2 meses ago | 0

Answered
Using the euler method
Kelsey - there are a couple of coding mistakes with the above. Before the code can execute, there is an error Invalid expressi...

2 meses ago | 0

Answered
How do I convert a DataMatrix back to a normal matrix?
Emil - see Convert DataMatrix object to double-precision array for details on the conversion.

2 meses ago | 0

Answered
math question error with the format
Dena - I suspect the error is due to the use of exp where you are not providing any inputs to this function. The code should pro...

3 meses ago | 0

Answered
How can I set the focus to a GUI element created with javacomponent?
Josh - which version of MATLAB do you have? Does your version support uihtml? If so, you could modify one of their examples to d...

3 meses ago | 1

Answered
Modify Knob From App Designer
Sossio - I suspect that you will want to create a discrete uiknob. Perhaps something like the following will do fig = uifigure;...

3 meses ago | 1

| accepted

Answered
Has anyone found Lamp enable and disable in appdesigner?
Ajeet - try using "on" or "off" (instead of 1 or 0) and add a pause after each change to the enabled property (so that there is ...

3 meses ago | 0

| accepted

Answered
How to cycle through two folders and search for files with similar names and load them into current directory
Natalie - a loop could look like the following for k=1:65 rawFilename = sprintf('InM%02d_RAW.txt', k); scaledFilename...

3 meses ago | 0

Answered
How to normalize rows of a matrix?
Kimberley - your code is overwriting the value that was assigned to aefm_2 on the previous iteration aefm_2 = aefm_1(i,:)./max(...

3 meses ago | 0

| accepted

Answered
waitbar bar inside two for loops
Alajendro - rather than creating a new waitbar on each iteration of the inner loop, just create it once and then re-use it. For ...

4 meses ago | 1

| accepted

Answered
How can I record an audio from a tuggle button in the GUIDE ?
Samuel - I think that the problem is that you are creating a new audio player each time the callback is called: handles.audio =...

4 meses ago | 0

Load more