Community Profile

photo

Guillaume


University of Brighton

6.617 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
'Out of memory' error for element-wise vector product '.*'
Prior to R2016b, matlab worked the way you expected. The shape of the vectors did not matter. In R2016b, mathworks changed the b...

circa 2 ore ago | 0

| accepted

Answered
Is there a way to record the usage of functions in a matlab program?
Bearing in mind that as Adam says matlab has no concept of a user and also bearing in mind that collecting user names may fall u...

circa 3 ore ago | 1

Answered
Logicals with empty double column vectors
c=find(cellfun(@isempty,a)); a(c,:)=[]; The second line implies that a is 2D. Yet, find as used will return linear indices, so...

circa 5 ore ago | 0

| accepted

Answered
Can a string be converted into a function call inside a GUI?
"This does not" str2func(fname) Yes, because str2func doesn't invoke the function, it just returns a handle to the function. Y...

circa 6 ore ago | 2

Answered
How to select a random number from a matrix
Use randi to select an index at random: A(randi(numel(A)))

circa 6 ore ago | 1

Answered
sizing microgrid using for and if statement
It sounds like you have several problems. The first one being the data generation which you currently do with some form of digit...

circa 7 ore ago | 0

Answered
how to find all possible path between 2 nodes
Here is the code I posted as a comment to Walter's answer, it requires this function from my answer to another question: %g: a ...

circa 8 ore ago | 2

| accepted

Answered
Filling missing values of selected columns of a table with previous values
Star's answer works (please don't delete it!) or you can use: Data(:, {'English', 'Science'}) = fillmissing(Data(:, {'English',...

1 giorno ago | 0

Answered
Problem with logical indexing
freezing is the name of the function. So when you write freezing inside the function, you're telling it to call itself. Of cours...

1 giorno ago | 1

| accepted

Answered
Check common elements in two vectors and remove them from both the vectors leaving any duplicate. (Example Inside)
"Thank you, intersect did it" intersect on its own will not do it since all set membership functions (setdiff, setxor, union, i...

1 giorno ago | 0

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

1 giorno 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(:,...

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

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

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

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

2 giorni 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]; ...

2 giorni 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 [~,...

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

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

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

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

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

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

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

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

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

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

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

13 giorni ago | 0

| accepted

Load more