Community Profile

photo

Guillaume


University of Brighton

6.777 total contributions since 2012

Guillaume's Badges

  • Scavenger Finisher
  • Thankful Level 1
  • 36 Month Streak
  • Master
  • Introduction to MATLAB Master
  • Quiz Master
  • Leader
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer
  • Puzzler
  • Creator
  • Scholar
  • Speed Demon
  • CUP Challenge Master

View all

Contributions in
View by

Answered
How do I find multiple times in one array the first index of 25 samples exceeding the threshold
You never needed a loop to do what you want. The below will find the start indices of all runs of 1 of length 25 or more: %demo...

2 dagen ago | 0

| accepted

Answered
time formate changes while exporting table as excel
The date/time format specifiers in Excel are slightly different from the ones use by matlab. In particular, to display milliseco...

2 dagen ago | 0

Answered
Need help creating a for loop
No need for a loop: result = nonzeros(flipud(tril(repmat((95:-5:5)', 1, 95/5))))' Of course, if this is homework and you do ne...

2 dagen ago | 0

| accepted

Answered
Making loop calculate-able
Even if your code is correct, it is extremely bad practice to use the same variable names for the loop indices and for local var...

3 dagen ago | 0

Answered
How to fix the errors Arise from moving .m files and functions in folders?
Ok so I should move all of the programs and functions (.m files ) in other drive except drive C (which Matlab has installed), fo...

3 dagen ago | 1

Answered
Get all sets of cells from two arrays of cells, each of which contains exactly one cell from each column of each arrays.
There's no such thing as an array of cells in matlab. There are matrices or arrays (a matrix being a 2D array) and there are cel...

3 dagen ago | 0

| accepted

Answered
matlab file on disk might be empty
I would suggest you contact your IT. There's clearly a synchronisation problem between your computer and the network drive. Note...

3 dagen ago | 0

Answered
Choosing data based on names
Of course, you don't need to hardcode anything. If you really just want A: [minval, maxval] = bounds(data.Test1(data.Type == '...

5 dagen ago | 1

Answered
Variance function in matlab
Yes, this is exactly what it says in the documentation. Weight, specified as one of: 0 — normalizes by the number of observati...

5 dagen ago | 0

| accepted

Answered
How do you remove duplicates of nested cells?
Sounds like: Dates{1} = unique(Dates{1}); %What a misleading variable names if it doesn't contain dates/times! is what you're...

5 dagen ago | 0

Answered
Index position exceeds array bounds(must not exceed 15)
I'm not sure what you find unclear about the error and why you can't find the problem yourself. Index in position 1 exceeds arr...

5 dagen ago | 0

Answered
large numbers in K means
What's unclear about the error? You must specify less cluster than the number of rows in your matrix/vector. So make sure that K...

5 dagen ago | 0

| accepted

Answered
./ and .* operations
As per G A's comment, R2016b introduced automatic expansion for compatible array sizes. So, this works in R2016b or later: x = ...

5 dagen ago | 0

Answered
Assign value to matrix using vector value as an index
One solution: [row, page] = ndgrid(1:numel(a), 1:numel(B)); %cartesian product of indices of a and B. Indicates which row and ...

5 dagen ago | 0

| accepted

Answered
Loop for extracting a matrix
Reshape your array into a 3D array with rows of 10 elements, columns of 150/10 = 15 elements, and 2 pages. Take the mean across ...

6 dagen ago | 0

Answered
How to generate the n number of figure for n numbers of subplots
I was very surprised to find that subplot 231 works. It's an undocumented feature of subplot, I would strongly recommend again...

6 dagen ago | 0

| accepted

Answered
list names in an array
A lot simpler than all that has been suggested: foldercontent = dir('C:\somewhere\*.csv'); filelist = fullfile({foldercontent....

7 dagen ago | 2

Answered
Concatenating cell arrays with a different number of columns
maxcols = max(cellfun('size', NonC_tRNAs, 2)); %get the number of columns of the widest array padded = cellfun(@(m) [m, zeros(...

7 dagen ago | 0

| accepted

Answered
Generate Random Matrix 0's,1's
Note that a 3x2 is a matrix with 3 rows and 2 columns, not the other way round. Bearing in mind that there are n^m such matric...

7 dagen ago | 1

Answered
Problem with register MATLAB as Automation Server
As the error message says your Windows user account must have administator privilege to install automation servers (matlab or ot...

8 dagen ago | 0

| accepted

Answered
Extract vector parts around index under boolean conditions
One way: testvector = repmat([0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 0 1], 1, 3); %replicate your demo vector so that there is ...

8 dagen ago | 0

| accepted

Answered
caesar cyphor encryption problem .
Use mod or rem to constrain values between 0 and a maximum, with wrap-around.e.g: >> mod(0:51, 26) ans = Columns 1 through ...

9 dagen ago | 0

Answered
Finding every point of intersection between any number of circles and ellipses centered at the origin
Your initialisation variables are a bit strange. You create PhiMax and Phi but never use them. Your b calculation just reduces t...

9 dagen ago | 0

Answered
Writing data to table with for loops
As commented you don't need loops to construct all your spurs: LO = 11:2:21; RF = 2:0.1:18; n = 0:5; m = 1:5; [mm, nn, rf, ...

9 dagen ago | 2

| accepted

Answered
how to identify unique columns, based on the first two rows, make an average of the uniques columns and remove the duplicate columns?
using unique and accumarray: [latlong, ~, group] = unique(yourmatrix(:, [1, 2]), 'rows'); %optionally use the 'stable' option...

9 dagen ago | 2

Answered
Pull out strings and its values from a text file.
HI Sriram, sorry I was away last week. Parsing the the first part of each message (date, level, source) is trivial. It's the pa...

10 dagen ago | 1

Answered
Most efficient method to search through file names?
I would create a function that parses the filenames and split them into variables of a table (or even a timetable). Then it's tr...

10 dagen ago | 1

| accepted

Answered
How To Load Multiple Text Files (specific context)
As dpb suggested use one of the modern file import function such as readtable or readmatrix instead of the old textscan. These c...

10 dagen ago | 1

| accepted

Answered
my for loop is not extracting all the possible values
A very important rule when you use floating point numbers on a computer (not just matlab, but all languages). Never compare floa...

16 dagen ago | 2

| accepted

Answered
Table values that is a scalar string
As said in your previous question, read the doc about tables. For this particular case, the bits about table indexing. () index...

16 dagen ago | 0

| accepted

Load more