Community Profile

photo

Guillaume


University of Brighton

6,607 total contributions since 2012

Guillaume's Badges

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

View all

Contributions in
View by

Answered
Reading data from csv files
%your original code, slightly modified csvfiles = dir('*.csv'); filescontent = cell(numel(csvfiles), 1); for i = 1:numel(csv...

1 hour ago | 0

| accepted

Answered
How can i change the values of entire rows or columns using values of other rows or columns in a 3D matrix with for loops;
This works with your example: c = cat(3, [2 0 3 0 1; 0 0 0 0 0; 1 0 3 0 2], [3 0 1 0 2; 0 0 0 0 0; 5 0 3 0 8], [1 0 5 0 9;0 0 0...

2 hours ago | 0

Answered
Calculate minimum distance between points in a mesh
Here is one way: points = rand(20, 2); %demo data distance = hypot(points(:, 1) - points(:, 1).', points(:, 2) - points(:,...

2 hours ago | 0

Answered
How to export a struct to flat file?
fnames = fieldnames(MCI1); c = struct2cell(MCI1)'; heights = cellfun(@numel, c(:, 4)); t = [cell2table(repelem(c(:, [1 2]), h...

12 hours ago | 1

| accepted

Answered
i need to convert a folder of 200 .jpg images to .mat (to create 200 separate .mat files). i know there should be an easy matlab for loop to do this but I need help (newbie). thanks!
folder = 'C:\somewhere\somefolder'; filelist = dir(fullfile(folder, '*.jpg')); %get list of all jpg files in the folder matna...

17 hours ago | 1

Answered
function variable undefined. How to declare it ? Says Totalcost not defined
What you have written is a script (name unknown) with a local function called Budgetcompare. A function (local or normal) never ...

17 hours ago | 0

Answered
Extract column data based on date
Most likely (for lack of a sample file to test code with): wavedata = readtimetable('C:\somewhere\somefile.csv'); %requires R2...

20 hours ago | 0

Answered
Conversion of multidimensional cell into string
Taking a guess here, since you're still not using matlab syntax for your example: C = {2, [0,1,0]; 73, [0,1,1,1]; ...

21 hours ago | 0

Answered
How to order a matrix?
how can i do that? Use uniquetol instead of unique. Note that the 'rows' option of unique is 'ByRows', true with uniquetol [~,...

22 hours ago | 0

Answered
Correct error in logical indexing
You use length on a matrix. If your matrix happens to only have one row, your code will error since length will return the numbe...

1 day ago | 3

Answered
Save data in excel sheet using pushbutton.
The problem is either with framecount or dia. We have no idea what size they are nor what their type is. It's also unclear why y...

10 days ago | 0

Answered
Error when trying to load .dll
You probably need to add an 'IncludePath' parameter to your loadlibrary call to specify which directory the include file rtw_con...

10 days ago | 0

Answered
Calculation with Certain Portion of the Matrices
The only way you're going to avoid that sawtooth effect is by starting with a meshgridded x and angle and calculating y from tha...

10 days ago | 0

| accepted

Answered
Checking the range of input arguments
Do you actually need to use varargin? It doesn't appear to server any purpose here, if you always assign the same variable.It lo...

10 days ago | 1

| accepted

Answered
make true statements return value that it is associated with
" I already have a for loop to set up for the intersect values " It's very likely that a loop is not needed at all. Show us tha...

12 days ago | 0

Answered
Mean value of array
Trivially solved with a convolution A=[1 2 3 4 5 6 7 8 ; 9 10 11 12 13 14 15 16; 17 18 19 20 21 22 23 24; 25 26 27 ...

12 days ago | 0

| accepted

Answered
Putting two seperate columns in to one variable and how to insert a Array into mysql
Assuming that by column, you mean column vector use the horizontal concatenation operation , instead of the vertical concatenati...

12 days ago | 0

Answered
Vectors seen as a combination of other vector's elements
This is the generic version of Madhan's answer. Works for any (reasonable!) number of inputs. in = {[1, 2, 3], [4, 5], 6}; %ce...

12 days ago | 0

Answered
Index in position 2 exceeds array bounds (must not exceed 1).
T = Robot.fkine([Th_1 Th_2 Th_3]); handles.Pos_X.String = num2str(floor(T(1,4))); Your second line assumes that T (a.k.a Robot...

12 days ago | 0

| accepted

Answered
make a Sequence number
Layout=[1,1,1;2,2,2;3,2,1;91,3,1;95,4,2;98,4,0.5]; A=[1,2;1,3;3,91;91,95;91,98] searchreplace = [91, 4; 95, 5; 98, 6]; %2 col...

12 days ago | 0

| accepted

Answered
How to find the unique values between two datasets?
Please use valid matlab syntax for your example so we don't have to wonder what your inputs actually are. A={(1,2,3),(1,2,4),(1,...

12 days ago | 0

| accepted

Answered
setting range for pixel intensity
You have to decide if your image is greyscale or colour. You obviously can't set a pixel to green in a greyscale image without f...

13 days ago | 0

Answered
Array indices must be positive integers or logical values.
They're not meant to be empty Well, then you go back through the code to find out why they're empty. Going up we see, ta = t...

13 days ago | 0

| accepted

Answered
how to write a script that outerjoins multiple data files
Something like (untested, expect typos): folder = 'C:\dropbox'; filelist = dir(fullfile(folder, 'File*.csv')); for fileidx = ...

14 days ago | 1

| accepted

Answered
Cell array / Concatenate non - NaN results
You mention a regex. You'd be better off fixing the regex that produces that output. But if that's not an option: A = { [NaN] ...

14 days ago | 0

| accepted

Answered
Sum of a row
sum(yourmatrix, 2) will give you the sum of each row as 3x1 vector. sum(yourmatrix(1, :)) will give you the sum of just the f...

14 days ago | 0

Answered
Continue a loop when entered an option
Just wrap your code in a while loop: option = 1; while option == 1 %... your code here option = input('Do you want t...

14 days ago | 0

Answered
Use of break statement causing issue
I'm not sure what you think break does. It completely stops the loop. So, when your code hits break, you stop the i loop and the...

14 days ago | 0

Answered
changing input variable loop
I won't belittle the point about numbered variables. Read Stephen and Jan links. Suffice to say, if you start numbering or namin...

14 days ago | 1

Answered
how to make polyfit on call arrays?
It sounds like by punch you mean horizontally concatenate. In which case, what you want is easy to do: %b a cell array of 3xN m...

14 days ago | 0

| accepted

Load more