Community Profile

photo

Stephen Cobeldick


Last seen: Today
6,838 2014 年以降の合計貢献数

Suspensa Vix Via Fit

Stephen Cobeldick's バッジ

  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • GitHub Submissions Level 3
  • First Submission
  • Master
  • 36 Month Streak
  • Thankful Level 4
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

詳細を表示...

貢献した分野
表示方法

回答済み
Data Entry with struct
function dbs = voters(dbs,varargin) Nm = varargin(1:2:end); ID = varargin(2:2:end); ix = cellfun(@ischar,Nm)|cellfun(@isstrin...

約1時間 前 | 0

回答済み
How to perform logical AND on intervals of contiguous locations
"I need to vectorize it to make it run faster (I am working with huge arrays)" Using accumarray should be reasonably efficient:...

約4時間 前 | 0

回答済み
How to interpret entries in documentation's left pane
"What do the entries below that represent?" They list all other page headings that are at the same level in the current Content...

約10時間 前 | 1

回答済み
How to use regexp to extract data?
>> tdata = {'XX__TG';'GB_TH';'BN__TH'}; >> spl = regexp(tdata,'_+','split'); >> spl = vertcat(spl{:}); >> out1 = spl(:,1) ou...

約11時間 前 | 0

回答済み
Why am I warned about defining variables in a nested function, when I don't?
So far no one has actually explained the warning, which is a pity because this is really quite an interesting question. Some an...

約13時間 前 | 2

回答済み
How do I swap the elements in the major diagonal with those in the minor diagonal?
Similar to madhan ravi's answer, without sorting: >> x = [1,2,3,4,5;6,7,8,9,1;2,3,4,5,6;7,8,9,1,2] x = 1 2 3 4 5 ...

1日 前 | 2

回答済み
Removing the max and min of a vector without removing multiple minimums or maximums
[~,Sx] = min(a1); % Shortest Link [~,Lx] = max(a1); % Longest Link a2 = a1; a2([Sx,Lx]) = [] And tested using the values tha...

1日 前 | 1

| 採用済み

回答済み
How to import data with exotic delimiters.
Using textscan's optional arguments properly avoids awkward reshaping of the output (and you have more flexibility because you c...

1日 前 | 0

回答済み
How to save multiple text files with same name, but with incrementing numbers
"The function I'm using, writetable, requires to specify the filename between apostrophes..." Actually the writetable documenta...

2日 前 | 0

回答済み
Automatically naming mat files with variable names
The cause of your difficulties lies in the unfortunate design decision to force meta-data into the variable names. Meta-data is ...

3日 前 | 1

| 採用済み

回答済み
How can I merge rows into one with the same ID number?
Assuming that the non-diagonal values are exactly zero, then you could use varfun something like this: >> T = cell2table({'A',1...

3日 前 | 0

回答済み
Storing the generated matrices from a for loop into cell arrays and access them later to multiply them altogether
No cell array required: >> x = [2,5,23]; >> A = [9,8;7,6]; >> [n,n] = size(A); >> M = 1; >> for k=numel(x):-1:1; M = M*(A-x...

5日 前 | 0

回答済み
Example got removed from the mathworks website
Unfortunately the Wayback Machine did not seem to have a copy of it, but it was still available in Google Cache, so I saved you ...

6日 前 | 1

| 採用済み

回答済み
Substitute string to double
>> A = {'0+1/R1','0-1/R1','1';'0-1/R1','0+1/R1+1/R2','0';'1','0','0'}; >> A = strrep(A,'R1','1000'); >> A = strrep(A,'R2','100...

6日 前 | 0

| 採用済み

回答済み
i want to write a code where equation is y=x*x. if y=100 what is the value of x?
>> f = @(x) x.^2 - 100; >> x = fzero(f,pi) x = 10

6日 前 | 0

| 採用済み

回答済み
delete column from matrix
Where M is your matrix: M = M(:,24:24:end)

7日 前 | 0

| 採用済み

回答済み
How can I differentiate between powermod(a,b,c) and mod(a^b,c)
>> 104^45 ans = 5.8412e+90 is well above flintmax, so it is very unlikely to exactly represent the integer that you think ...

7日 前 | 0

回答済み
matrix creation from a loop
The simplest and most efficient solution is to just create one matrix: lat = zeros(6964,60) which you can then trivially acces...

7日 前 | 1

回答済み
How can I index a 3D array like A(n,m,:) and get the result as a 1D array?
B = reshape(A(2,3,:),1,[])

7日 前 | 0

| 採用済み

回答済み
How to attribute a letter to unique combinaisons
There does not seem to be a convenient way to apply a function to table groups that does not also accumulate the results (e.g. l...

7日 前 | 0

| 採用済み

回答済み
How can I pass a anonymous function as an output to another function?
"Looks likes I am not allowed to do that . I would like to know how this can be achieved" Your attempted code has several bugs ...

7日 前 | 0

| 採用済み

回答済み
image a set of matrix variables after loading them in
Do not use load. Assign the imported data to an array, e.g.: theFiles(k).data = readmatrix(fullFileName); Now all of your impo...

8日 前 | 1

| 採用済み

回答済み
adding and subtracting elements in the same row in an nested for loop
"My assumption is that I have to do this using a nested for loop." Using array operations would be a much better use of MATLAB,...

8日 前 | 0

| 採用済み

回答済み
How can I sort a matrix to match another matrix?
>> [~,idx] = sort(B); >> [~,idx(idx)] = sort(A(:,2)); >> A = A(idx,:) A = 11 1 21 2 12 1 31 3 ...

8日 前 | 1

| 採用済み

回答済み
Maximization of a Function
The syntax .. = -@(..) is not valid for multiple reasons: the output of @ is a function handle. Arithmetic operations are no...

8日 前 | 1

回答済み
How can I make multiple vectors the same length?
Because each of the input columns has their own domain, you will have to loop over the columns and interpolate each column separ...

8日 前 | 1

| 採用済み

回答済み
How do I read multiple float values in different columns from a txt-File with headers?
You can simply use any of the high-level file importing commands that your version of MATLAB supports, e.g. readtable, readmatri...

9日 前 | 1

| 採用済み

回答済み
Finding specific number of characters in vector
>> c = 'aryzbuk'; >> nnz(c~='b' & c~='r') ans = 5

9日 前 | 0

回答済み
how to store the matrix value in cell array?
If C is a matrix, then you need to use curly braces to access the contents of the cell array T3: T3 = cell(1,10); for k1 = 1:n...

9日 前 | 0

| 採用済み

回答済み
How to transmit variables in problem structure
You need to parameterize the function: https://www.mathworks.com/help/matlab/math/parameterizing-functions.html For example us...

10日 前 | 0

| 採用済み

Load more