Community Profile

photo

Turlough Hughes


Last seen: Today
168 total contributions since 2019

Turlough Hughes's Badges

  • Community Group Solver
  • 6 Month Streak
  • First Review
  • Thankful Level 1
  • Knowledgeable Level 3
  • Solver
  • First Answer

View details...

Contributions in
View by

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

2 días ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

2 días ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

2 días ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

2 días ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

2 días ago

Solved


Find max
Find the maximum value of a given vector or matrix.

2 días ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

2 días ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

2 días ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

2 días ago

Solved


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

4 días ago

Answered
snapshot problem in video processing
snapshot() is intended for use with a cameraboard object or webcam object and you are attempting you input an image object. You...

4 días ago | 0

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

5 días ago

Answered
How to graph data in cells?
Your data has an empty cell in it so the first step here is to remove that ToBeGraphed(cellfun(@isempty,ToBeGraphed))=[]; % rem...

7 días ago | 0

| accepted

Answered
Extract subset of time-curves from a 4D volume
I can reduce this to a single for loop which iterates through the timesteps but i'm not sure about doing this entirely without l...

18 días ago | 0

| accepted

Answered
Sum of elements in an array over x
a = [0.023 0.056 0.053 0.034 0.021 0.075 0.088]; result = sum(a(a>0.05))

25 días ago | 1

| accepted

Answered
Building a matrix inside a for loop
You could do it as follows: xlsData = xlsread('PartS_all.xlsx'); partID = xlsData(:,4); uPartID = unique(partID).'; % Unique ...

alrededor de 2 meses ago | 0

| accepted

Answered
how to store coordinate values xy[] for randomly generate point
The format you used (based on the code you provided) is a structure and the format you are looking for is an array. To generate ...

alrededor de 2 meses ago | 0

Answered
Multiple combinations of a matrix
Try the following, it should work for any size of M. function x = pairCombos(M) numRows = size(M,1); C = combnk(1:numRows,2...

2 meses ago | 0

| accepted

Answered
How to reshape in 3D a downsampled matrix
Easiest thing to do would be just this: newData = data(1:factor:end,1:factor:end,1:factor:end);

2 meses ago | 0

| accepted

Answered
Using a for loop to graph values using different colors
If you want to use scatter so that the color depends on distance, this is how you do it: % Data clear all close all data = [...

3 meses ago | 1

Answered
Finding Minimum Distance Between Points to Find Indexed Variable
If you don't have the statistics and machine learning toolbox you can do the following: [~,idx] = min(abs(dtamatrix(:,2) - Feli...

4 meses ago | 0

| accepted

Answered
Create multiple arrays with different names and specific data
It is possible to do exactly what you asked but that is considered a bad coding practice (explanation here). Why don't you st...

4 meses ago | 0

| accepted

Answered
Creation of an automatic description image
It looks like you have a binary image but you uploaded it as a .jpeg, I have included 3 lines to "workaround" and get back to an...

4 meses ago | 0

| accepted

Answered
How to crop a circle from an image?
Try the following tutorial: % Setup clear close all clc inputImg = imread('cameraman.tif'); % Show demo Image hf = figu...

4 meses ago | 0

| accepted

Answered
calculating area and perimeter for pap-smear image
There are numerous ways you could segment the nucleus, I elected here to threshold based on R,G,B values in the image. To work o...

4 meses ago | 0

| accepted

Answered
I want to extract values from second column of the matrix which correspond to the range 6 to 7 of the first column. How to do it?
Let's say your matrix is called M, then you can extract rows from column 2 corresponding to those in column 1 which are between ...

4 meses ago | 0

| accepted

Answered
3-D matrix operations
Here's the method I was suggesting. The idea is to take the first value and add half the difference (effectively interpolating) ...

4 meses ago | 0

Answered
Read text file with string
You could use the readmatrix function as follows: filename = 'My2.TXK' opts = detectImportOptions(filename,'FileType','text') ...

4 meses ago | 0

| accepted

Answered
Extract data (timestamps) from csv file
You could read the file in as a character vector with fileread and then use regexp as follows: filetext = fileread('Info.csv');...

4 meses ago | 0

| accepted

Answered
How to Interpolated data outliers
Generate some sample data: C = (1:3630).'; idxout = randperm(3630,500); % random index for outliers C(idxout) = C(idxout)+200...

4 meses ago | 1

| accepted

Load more