Community Profile

photo

Guillaume


University of Brighton

7 358 total contributions since 2012

Guillaume's Badges

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

View all

Contributions in
View by

Answered
Extra commas when using fprintf
Personally, I'd use: fprintf(" Old Means: (%s)", strjoin(compose('%.4f', M(:, :, i)), ','));

environ 10 heures ago | 1

| accepted

Answered
Sorting distance traveled by timestamps
So, you've got easy to use datetime in your array and you go and convert to harder to use datenum and then to single. Why? The ...

environ 14 heures ago | 0

| accepted

Answered
How map values of array to 0 and 1
It's trivial normalisation. Subtract the minimum of your array so the new minimum is 0, then divide by the max of that new array...

environ 15 heures ago | 0

Answered
Why am I getting "Array indices must be positive integers or logical values" when trying to add together all the integers?
Most likely you've created a variable called sum, so instead of summing the elements of Cost, you're using Cost as an index into...

environ 15 heures ago | 1

Answered
extract specific file from list of folders
First. you shouldn't be using addpath just to be able to load some data. addpath is intended to make code files visible, not dat...

1 jour ago | 0

| accepted

Answered
Importing data to change a NaN
You should be using readtable to load your data into a table. You could also use readcell but this would complicate things. You ...

1 jour ago | 0

Answered
How do I isolate rows from a table, containing the same column value?
There is no need to sort the table beforehand: [group, schoolname] = findgroups(MASSADOC.school); %get unique schools and assi...

2 jours ago | 0

| accepted

Answered
Delete a dimension from a 3d array to convert into a 2d array (Matrix)
squeeze(yourarray) or permute(yourarray, [2 3 1]) squeeze is simpler and will get rid of all singleton dimensions.

2 jours ago | 1

| accepted

Answered
Set properties of child objects without synchronisation errors
As I wrote in my comment to J. Alex, I don't see a problem with your initial design if the pipes can't be modified outside of th...

2 jours ago | 0

Answered
why save '.mat' as 'ascii' file appears as FILE instead of txt
If you want the file to have a .txt extension, then simply tell matlab so: filename1 = fullfile(name_folder_new,'coefficients_...

2 jours ago | 1

| accepted

Answered
Why am I getting 387 as the sum of my vectors when I input 1x1x1?
Your problem is not with str2num (although using str2num is not recommended, but that's another topic). Your problem is more fu...

3 jours ago | 0

| accepted

Answered
Replace a value in a vector with another
idx=(true,Failuretimesdet(k)==0) is not valid matlab syntax, I'm not even sure what you're trying to do with this. You seem to...

4 jours ago | 0

| accepted

Answered
Creating cell arrays and 'Operands to the || and && operators must be convertible to logical scalar values.'
While an if expression can be non-scalar in matlab it's never a good idea as many people (I assume you included) do not know how...

4 jours ago | 1

Answered
Random shuffle vector such that all elements fall in new index positions
I would: do a normal randperm that may map some elements back to their original location any element that has been mapped to ...

8 jours ago | 0

Answered
Trying to decrypt a message
tofind = '[a-zA-z#]' Read the regexp doc and its examples to learn how ranges work. You may want to add a quantifier to the e...

10 jours ago | 0

| accepted

Answered
Index exceeds the number of array elements (0). Error in ROI_timecourse_DICOM_v2_0 (line 20) FullFileName = FileName(1:suffix(1)-5);
Most likely, strfind(FileName, '.') didn't find a . so suffix is empty and of course suffix(1) is invalid since index 1 is more ...

10 jours ago | 0

Answered
Convert Binary matrix to Double Value
Bearing in mind that for A = [0 0 0 0 0 0] B is just 0 and that above 16 bits you don't have enough precision in a double number...

10 jours ago | 0

Answered
Large, unused cell aray in memory still slows down calculation significantly
Well, with the cell array you're doing 2x44100 matrix allocations with zeros, which all have to be copied into a new complex mat...

10 jours ago | 0

Answered
When merging two tables, then restart the number of rows
No, as you've stated the row number is not part of the table, it's only there to help you in case you need to index the table ro...

10 jours ago | 0

Answered
How do I import and read multiple text files with the same name from different folders
datafolder = 'C:\somewhere\somefolder'; %your root data folder dataname = 'RESULTS_TRIALS.txt'; %replace with appropriate ext...

10 jours ago | 0

| accepted

Answered
Getting cell array of structs to a usable form in R
destination_folder = 'C:\Somewhere\somefolder'; %change as appropriate filepattern = 'Drive%02d.csv'; %change pattern if need...

10 jours ago | 1

| accepted

Answered
Monte Carlo Method Fails
Monte carlo works fine. Clearly you have a bug. Why are you shuffling (with randperm) each suit before concatenating them? Woul...

10 jours ago | 0

| accepted

Answered
Remove elements from string array
One possible way: numericarray = double(yourstringarray); %convert string array to numeric. Text that can't be converted to nu...

10 jours ago | 0

Answered
question removed question removed
"I honestly don't even know where to start, my instructor never went over what "seed" means" Have you tried searching matlab's ...

10 jours ago | 0

Answered
Select method of Worksheet class failed
I'm sure the author is vey good at her research but a good programmer she's not. Global variables in every single function, what...

11 jours ago | 0

Answered
How can I interpolate a data set given by 5 "inputs"?
TLDR: The Y and xq you've constructed work for scatteredInterpolant but not for griddedInterpolant which uses a different format...

11 jours ago | 0

| accepted

Answered
Getting error for this code as Index in position 1 exceeds array bounds. Pls tell solution
Most likely, your image is smaller than 512x512. If that's not the problem then give us the entire text of the error message. ...

11 jours ago | 0

Answered
How to create another vector based on some if condition?
It's rare to have to use if in matlab, and it's certainly not the route to go if you want to operate on whole vectors or matrice...

11 jours ago | 0

| accepted

Answered
global variables in structure
Hopefully, you ]do not have any global variables. Global variables are typically a very bad idea. However, I think you're just ...

11 jours ago | 0

| accepted

Answered
how to split data with 'or' condition ?
My recommendation would be not to split your data into cell arrays. You're complicating your life for no reason. First, you sho...

11 jours ago | 0

Load more