Community Profile

photo

Stephen Cobeldick


Last seen: Today
7,318 2014 年以降の合計貢献数

Suspensa Vix Via Fit

Stephen Cobeldick's バッジ

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

詳細を表示...

貢献した分野
表示方法

回答済み
how to insert fprintf value into GUI edit text box?
You need to use sprintf, not fprintf: sprintf creates a character vector/string (this is what you need). fprintf prints direct...

約4時間 前 | 0

回答済み
Sorting the name field in dir command
You could download my FEX submission natsortfiles: >> S = dir('*.txt'); >> S.name ans = '1.txt' ans = '10.txt' an...

約20時間 前 | 0

送信済み


Customizable Natural-Order Sort
Alphanumeric sort of a cell array of strings, with customizable numeric format.

1日 前 | ダウンロード 47 件 |

Thumbnail

送信済み


Natural-Order Filename Sort
Alphanumeric sort of filenames or filepaths, with customizable numeric format.

1日 前 | ダウンロード 284 件 |

Thumbnail

送信済み


Natural-Order Row Sort
Alphanumeric row sort of a cell array of strings, with customizable numeric format.

1日 前 | ダウンロード 21 件 |

Thumbnail

回答済み
How to concatenate horizontally a cell into another cell based on a vector
X = [1,1,2,2]; C = {rand(3,2),rand(3,1),rand(3,2),rand(3,1)}; C{:} Method one: arrayfun F = @(x)[C{x==X}]; D = arrayfun(F,1...

5日 前 | 1

| 採用済み

回答済み
MAtrix Indexing with a vector that contains colon
The colons must be character, the numeric indices must be numeric (not char like you tried): A = rand(4,3,2,4,3,2,4,3,2,4,3,2);...

6日 前 | 0

| 採用済み

回答済み
Extract string with regexp()
inp = {'$abc_in','def_in_hij_out[]','xyz'} out = regexprep(inp,{'_(in|out(\[\])?)?\>','\W+'},'')

6日 前 | 0

| 採用済み

回答済み
Add an array to a cell arrayn within a for loop
V = [321,123,145,908,123,13,1,643,16,134,212,674,121,222,11]; X = [3,7,11,15]; F = @(b,e)V(b:e); C = arrayfun(F,X(1:end-1),...

6日 前 | 0

| 採用済み

回答済み
My plot comes up as a white graph with no line.
The basic problem is that this syntax if t==1,2,3,4,5; is equivalent to writing this (i.e. each expression is evaluated indepe...

6日 前 | 0

| 採用済み

回答済み
Conversion from string to numbers within table
Most likely you should fix the data importing, rather than messing around with converting strings. load('data.mat') T = varfun...

6日 前 | 0

回答済み
Help with if statement in a calculation loop
The simplest and most efficient solution is to use MIN and MAX: x = 5 + randn(5,7)*1.5; x = x*1.3 + 0.5 x = min(max(x,1),10)...

7日 前 | 0

| 採用済み

回答済み
When creating a vector why does the size change when using a variable vs using a value?
"How come the variable is exactly the same value but gives a different answer?" No, the values are not exactly the same. In on...

8日 前 | 0

| 採用済み

回答済み
Why 'PreserveFormat' in writetable returns error?
The 'PreserveFormat' option was added in R2020b: https://www.mathworks.com/help/matlab/release-notes.html?rntext=PreserveFormat...

10日 前 | 0

| 採用済み

回答済み
Using matfile to partially extra data still loads entire file into memory
Transpose the cell array (when it is created), so that you are accessing a contiguous part of the cell array: Data = obj.CellAr...

10日 前 | 0

回答済み
How to make textscan robust against non-matching lines?
str = fileread('data.txt'); tkn = regexp(str,'#HELLOMATHWORKS,([^,]+),(\S+)','tokens'); tkn = vertcat(tkn{:}) vec = str2doubl...

10日 前 | 0

| 採用済み

回答済み
How to import several csv files (Nan,numeric,text) for operate with them after
"I want the cells to be rename because I want to know to which station corresponds the data in each cell. As you can see I could...

11日 前 | 1

回答済み
Conversion to double from function_handle is not possible message
You define ome1, ome2, and ome12 as functions of 1 or 2 input arguments, but in some cases you do not call their function handle...

11日 前 | 0

| 採用済み

回答済み
Extracting rows from table with specific digits
I changed your example data so that the first code string contains '2' but not in the 2nd position, to make a more thorough test...

11日 前 | 1

回答済み
Assignment of variables by comma separated lists
"Why is that?" The answer is surprisingly simple: the explicit syntax X,Y,Z is considered as three separate evaluations, much...

11日 前 | 0

| 採用済み

回答済み
How to delete certain strings with chaning numbers in a big data set
tmp = sprintf("page %d of 600",i); data_new4~=tmp Or ~strcmpi(data_new4,tmp) Note that you will want to replace the previous...

11日 前 | 0

回答済み
Kilobytes to bytes conversion
The SI system defines "kilo". The SI definition of "kilo" means 1000, and has never defined it to mean 1024. Here are the SI pr...

12日 前 | 1

| 採用済み

回答済み
how can partition a vector into smaller sub sequences
A = 1:19; N = [3,5,7]; S = mat2cell(A(1:sum(N)),1,N) Or V = cumsum([0,N]); F = @(b,e)A(1+b:e); S = arrayfun(F,V(1:end-1),V...

12日 前 | 0

| 採用済み

回答済み
How to find a number but if it repeats immediately after, take the first value.
A = [0 5 0 5 5 0 0 0 5 5 5 5 5 0 0 0]; X = diff([false,A==5])>0

12日 前 | 0

| 採用済み

回答済み
Accessing the values of a cell array stored in a table to make a new variable
Var1 = [true;false]; Var2 = [true;true]; c = {ones(1000,1);zeros(1000,1)}; T = table(Var1,Var2,c) T.v = cellfun(@(v)v(1),T.c...

12日 前 | 0

| 採用済み

回答済み
cell array in cell array
If you really want to use inconvenient nested cell arrays, this will work with your example data: b = [a{:}]; b = [b{3,:}] ht...

13日 前 | 1

| 採用済み

回答済み
Assigning columns of matrix to strings.
Naming variables dynamically is one way that beginners force themselves into writing slow, complex, buggy code: https://www.mat...

13日 前 | 1

| 採用済み

回答済み
How to feed additional variables into fsolve function
https://www.mathworks.com/help/optim/ug/passing-extra-parameters.html dv = [3610.30,2040.80,1203.70,483.04,106.03,15.54,3.39,1....

16日 前 | 1

| 採用済み

回答済み
How do you enforce Element-wise operations in function handles?
There is no trivial answer to this. Fundamentally your request involves swapping operators, just as if you requested to replace ...

16日 前 | 0

回答済み
remove the first 2 char of a string
What you show is a character vector, not a string. Which makes this easy using indexing: c = ',''B132-32'',''B134-22'',''S132-1...

17日 前 | 0

| 採用済み

Load more