Community Profile

photo

Guillaume


University of Brighton

7.353 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
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 ...

ongeveer 2 uur 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...

ongeveer 2 uur ago | 0

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.

ongeveer 2 uur 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...

ongeveer 5 uur 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_...

ongeveer 6 uur ago | 1

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...

ongeveer 22 uur 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...

2 dagen 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...

2 dagen 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 ...

6 dagen 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...

8 dagen 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 ...

8 dagen 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...

8 dagen 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...

8 dagen 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...

8 dagen 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...

8 dagen 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...

8 dagen 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...

9 dagen 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...

9 dagen 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 ...

9 dagen 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...

9 dagen 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...

9 dagen 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. ...

9 dagen 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...

9 dagen 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 ...

9 dagen 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...

9 dagen ago | 0

Answered
difference between x and 'x'
What a strange question! x is the variable you previously defined, so x*2 multiply the content of the variable by 2. 'x' is a ...

9 dagen ago | 0

| accepted

Answered
Indexing Elements in an Array
Apart from a blackboard, I'm not aware of any language where a < b < c is the proper way to test if a number is between two oth...

9 dagen ago | 0

Answered
how to remove zeros from the matrix?
A=[1, 0, 2, 0, 3 ; 0, 4, 0, 5, 0 ; 6, 0, 7, 0, 8]; B = reshape(nonzeros(A(:, 1:end-1).'), [], size(A, 1)).'

10 dagen ago | 1

Answered
changing value in the center of an array
What's an LPF filter? Possibly, is it a Low Pass Filter filter? I don't understand what you're trying to achieve with this x_2...

10 dagen ago | 0

| accepted

Answered
How does one rotate the bottom half of an image 180 degrees while keeping the upper half the same?
Use indexing to get the half of your image that you want to rotate, e.g. assuming the height of your image is a multiple of 2 l...

10 dagen ago | 0

| accepted

Load more