Community Profile

photo

Geoff Hayes


not applicable

2,616 total contributions since 2014

Professional Interests: Software Engineering, Target Tracking

Contact

Geoff Hayes's Badges

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

View details...

Contributions in
View by

Answered
can i use inequalities in 'if' statements?
Co$mo - use inequalities as if 6000 < income && income <= 20000) Repeat this for each of your conditions where you are checkin...

4 days ago | 0

Answered
create a function that takes a vector as an input parameter and returns another vector where each component is the initial vector repeated n times.
Nathali - what is the error message? What is cyclic_shift_recursion? Consider using repmat since your homework is indicating tha...

4 days ago | 1

Answered
i want to find the transpose of the matrix m but showing error. please can anyone help with the error
sadgun - can't you just do z=m'; without the period? Though I'm not sure why you are setting this result to z since your funct...

5 days ago | 1

| accepted

Answered
calculate the angle between a line (between two points) and the perpendicular line
Amneh - if a is (x1,y1) and b is (x2,y2) then let c be (x2,y1). With these three points, you should have a right-angled triangle...

5 days ago | 2

Answered
execute automatically Stop button command after X seconds that Start Button is pressed - GUI
Alessio - here is the code for your timer handles.ttt = timer('TimerFcn',{@stopButton_Callback, handles},'StartDelay',62); No...

6 days ago | 0

| accepted

Answered
Copying uitable contents and column headings to clipboard for non-fixed column headings
Jason - I think that you can use the ColumnName property of the uitable to get the column names. For example, hTable = uitable...

6 days ago | 0

| accepted

Answered
distance between randomly selected nodes
rem - wouldn't the distances be calculated something like the following distancesBetweenNodes = zeros(length(C)); % square matr...

7 days ago | 1

Answered
Blend Red,Blue,Green squares
TaeGun - this seems like homework so without giving too much away, how would you draw just one square? Suppose that each square ...

7 days ago | 0

Answered
Do while loop with recursive make the answer incorrect?
Paranee - please clarify what recursive means to you. You may want to start with N equal to one and compare the results. If they...

12 days ago | 1

| accepted

Answered
Index exceeds the number of array elements (2) Error
Joshua - the line of code h(i) = -1 * (it(i) + vt(i)/Rleq); is trying to access the third (for case i is 3) the third element ...

12 days ago | 0

Answered
MATLAB fread produce error! Invalid Size!
Amir - according to fread dimensions of output vector, this vector/array can only be a two-element row vector wheras you are try...

13 days ago | 1

| accepted

Answered
I am getting an error in the code of printSol written in Numerical engineering with MATLAB?
Dhruv - I wonder if when you copied the above code from Numerical Methods in Engineering with MATLAB that you didn't introduce s...

13 days ago | 0

Answered
create a loop image processing
Edmilson - look carefully at your for loop for n=240:519 images{n} = imread(sprintf('pentan1h_6uLmin_0%3d.tif',n)); i...

13 days ago | 0

Answered
Stop Displayed Image in UI Figure from being Moved by User
Shakirudeen - actually, imshow does allow you to specify the axes to plot the image to 'Parent' — Parent axes of image object ...

15 days ago | 0

Answered
Issue with g-input: as I click on an image from north to south, the y values are positive values that progressively get larger and larger
Arian - the pixel in the top left corner of the image corresponds to the first row and first column of your image (matrix). So i...

15 days ago | 0

| accepted

Answered
convert number to string problem
Yu - I think the problem might be because when you use num2cell, you are creating a cell array of numbers and not a cell array o...

15 days ago | 1

Answered
Dimensions of matrices being concatenated are not consistent
Matt - from your above description, C is an rxn matrix and D is an rxm matrix where r is the number of outputs. Doesn't this mea...

16 days ago | 0

Answered
i have problem in heat equation 1D
Ali - in the future, please include the error message (if any) that you are observings and be as descriptive as possible...becau...

16 days ago | 0

Answered
How to fill a region defined by coordinates?
Mirlan - you can use fill to colour the area enclosed by your three points. For example, you can add the following to the end of...

16 days ago | 1

| accepted

Answered
index exceeds the number of array elements (1).
changsu - I think there are a couple of bugs with the above code. When running it, the first error is Attempted to access midx(...

16 days ago | 0

Answered
Help needed to validate if a directory exists and the user has write permissions
Jason - why do you need a second while loop to check the write permissions of the folder? You could just use the if/else you hav...

17 days ago | 1

Answered
looping code for ct slice
mohd - perhaps something like this to get the updated ct on each iteration for k=1:75 tag = sprintf('ct%02d',k); % ...

17 days ago | 0

| accepted

Answered
I am trying to find all the multiples of 3 below 1000. I've tried using mod but im a bit stuck.
Andrew - if you have a number n then it is divisible by three if the remainder after division by three is zero (see mod for deta...

18 days ago | 0

Answered
How can I use slider value in push button area, to generate a function.
Tonusree - if you want to use the a value in your pushbutton callback (is this on_switch_Callback?) then just do function on_sw...

18 days ago | 0

Answered
error while evaluating uicontrol call back
vidhya - your pushbutton1 callback has the following two lines of code FileName = imread('1.jpg'); img=imread(FileName); One ...

19 days ago | 0

| accepted

Answered
Trying to create a text file with 3000 rows of data and 7 columns.
Shivam - what is your intent with this code p(angular rate along x) = -2 + (2+2)*rand(3000,1); q(angular rate along y...

19 days ago | 0

| accepted

Answered
How to use bluewhitered function?
Yandong - the bluewhitered code seems to have been intended to work under the assumption that it returns an M-by-3 matrix contai...

19 days ago | 0

| accepted

Answered
Help with nested functions and finding the circumcentre
Sam - you have nested the circumcentre function within your parent function (good) but you still need to call it somewhere. in o...

19 days ago | 0

| accepted

Answered
How to convert a vector of durations to just floats
Seth - could you try using the Convert Durations to Numeric Array of Seconds example and just convert as X = ...; % your durati...

20 days ago | 0

Answered
Adding numbers to specific matrix index.
However for each ’i’ row there will only be 3 ‘j’ columns with nonzero numbers How do you determine which three columns of the i...

20 days ago | 0

| accepted

Load more