Community Profile

photo

Guillaume


University of Brighton

7,120 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
Check if a set of coordinates are on a line
Probably, the best way is to use polyfit (which does a least square fit) and look at the norm of the residuals. If it's small en...

3 hours ago | 0

Answered
New serial communication with serialport()
But now, I don't see a way to access the serialport object created in the beginning in other functions You just have to pass th...

3 hours ago | 0

Answered
Getting an error of 'Reference to non-existent field'
The way traj_generator is coded, when t is 0, it returns a structure with only 3 fields: pos, yaw and yawdot (these last two are...

5 hours ago | 0

| accepted

Answered
bwboundaries : missing coordinates of one of the two borders of my image
The problem has nothing to do with bwboundary. The problem is with you calling plot in a loop without hold on, so each time you ...

6 hours ago | 0

Answered
vector of integers modification
Possibly: rank = [4, 1, 2, 2, 4]; [~, ~, rank_new] = unique(rank)

6 hours ago | 2

| accepted

Answered
Converting a date in character format to an actual date recognized by MATLAB
Your allDate = datetime(zeros(1,length(Filename))); will only work if length(Filename) is 3 or 6. Otherwise you'll get an err...

19 hours ago | 0

| accepted

Answered
Using 'assignin' to assign value to variable 'max'
First and foremost, you shouldn't be using assignin and its friends (evalin, etc.). There's always better ways to do whatever yo...

20 hours ago | 1

| accepted

Answered
Getting an 'Array indices must be positive integers or logical values' error
You should read the comments at the top of the function and understand them. In particular, the function must be initialised fi...

21 hours ago | 1

| accepted

Answered
Why does jsonencode parser does not remove exponential notations when format longG is used?
The straightforward answer to your question is simple. format has nothing to do with jsonencode, it only affects display at the ...

21 hours ago | 1

| accepted

Answered
Multiple 'EndOfLine' readtable
This has nothing to do with the EndOfLine character (which is typically not rendered when viewed in a text viewer). As the erro...

22 hours ago | 2

Answered
Unique rows of 2 cells with 2 columns each.
merged = [new; old]; %simpler way to write vertcat(new, old) [~, row] = unique(merged(:, 1)); %get row index of unique values...

1 day ago | 1

Answered
One measure greater than another?
Note than an even simpler way to extract data from a table is with dot indexing: Wanted = T.SFStartFreqHzoffundamental; %equiv...

1 day ago | 0

Answered
Please explain the following line of code
What couldn't you run the code and see what it does? Your line of code is just a convoluted of doing: o(1:2:end) = -32 which ...

2 days ago | 0

| accepted

Answered
Rearrange a given array
This would work as long as V has a multiple of 10 elements: %demo data V = [ 19 15 11 2 16 3 1 18 14 3 18 19 20 1 13 4 14 3 1 ...

2 days ago | 0

| accepted

Answered
Matlab displays truncated output with elipses. How do I fix this?
As far as I can tell, this is and has always been normal behaviour in the live script editor. Same as with normal scripts, you...

2 days ago | 1

| accepted

Answered
Readtable for a huge (no good schema) CSV file!
As has been suggested you will have to parse the header and the values separately. It can't be done with the same readtable call...

2 days ago | 0

Answered
Run ImageJ plugin OrientationJ using MIJI from Matlab
For 1), unfortunately, it's a problem with your plugin which clearly has not been designed to run non-interactively. Unless the ...

2 days ago | 0

Answered
'.' is not an internal or external command, nor is it a runnable program or batch file
First use fullfile to build paths instead of string concatenation and adding the path separator yourself. It would be more relia...

2 days ago | 2

Answered
Variable in Text [Matlab]
How can I implement variable to the text variable You don't! Numbered variables are always a bad idea. Instead you use indexing...

3 days ago | 0

Answered
Import of tables from R where the first line describing the column names is one element shorter
Yes, readtable expects the variable name line to have a placeholder (DimensionName) for the row name column. I suggest you raise...

3 days ago | 1

| accepted

Answered
changing file name in matlab
Something like this should work: folder = 'C:\somewhere\somefolder'; %whichever folder contains the files filelist = dir(fu...

3 days ago | 1

Answered
matrix mis-match
There doesn't appear to be any logic behind the choice of * vs .*, / vs ./, etc. If you don't understand the difference between ...

6 days ago | 1

| accepted

Answered
multiply two series of vector in loops
Assuming R2016b or later: result = MA .* permute(MB, [3, 2, 1]); will give you a 3D matrix, where result(i, :, j) is MA(i, :) ...

6 days ago | 0

| accepted

Answered
How can i move excel sheets in the same file
This should do the job: function reordersheets(excelfile) %excelfile: full path of excel file whose sheet are to be reorde...

7 days ago | 0

| accepted

Answered
Calling function described in actxcontrol inside parfor loop
I'm not entirely sure what you mean by "It doesn't exist inside the script as it is, but this function is a component of actxcon...

8 days ago | 0

Answered
mkdir and simulations problems
As far as I can see the problem has nothing to do with matlab expertise but is a failure in your logic. You create a folder nam...

8 days ago | 0

Answered
How to extract elements from each dimension of a 3D matrix and put it in a vector.
Sure, you just have to type the same code 91 times... As you can guess, that's not a viable approach. If you start numbering va...

9 days ago | 0

| accepted

Answered
Add a value to an element in a matrix
Cause is a specific problem where I need to add that values of S just in these columns of A Then, this should work: A(S(1, :) ...

9 days ago | 0

| accepted

Answered
How to divide timeseries data into seasonal variation
Note that if you're indeed using timeseries, you may be better off using timetables instead. They're slightly easier to use and ...

9 days ago | 0

Answered
FileCopy does't work
I don't remember the details of your previous question, but clearly the code I gave you is meant to work with data imported a pa...

9 days ago | 1

| accepted

Load more