Community Profile

photo

Stephen Cobeldick


5.896 total contributions since 2014

Suspensa Vix Via Fit

Stephen Cobeldick's Badges

  • Master
  • 36 Month Streak
  • Thankful Level 4
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer

View details...

Contributions in
View by

Answered
could anyone help me how to display all the numbers inaddition to the numbers present.
>> A = [1,2;1,3;2,5;2,4;3,5;4,6;4,5] A = 1 2 1 3 2 5 2 4 3 5 4 6 ...

alrededor de 8 horas ago | 0

| accepted

Answered
How can I find a row in a matrix in which all elements apply to a relational operator?
>> idx = all(A>0.25,2) % logical index idx = 0 0 0 1 0 0 >> find(idx) % subscript index a...

alrededor de 8 horas ago | 0

Submitted


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

alrededor de 8 horas ago | 26 downloads |

Thumbnail

Submitted


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

alrededor de 8 horas ago | 225 downloads |

Thumbnail

Submitted


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

alrededor de 8 horas ago | 16 downloads |

Thumbnail

Answered
str2num not working on array
It would be simpler to use a structure (in this example I entered "Red" into the dialog box): >> S.red = [1,0,0]; >> S.green...

alrededor de 9 horas ago | 0

Answered
Using strfind to find character index in word
>> HangWord = 'each'; >> Guess1 = 'e'; >> index = strfind(HangWord, Guess1) index = 1

4 días ago | 0

Answered
Variable in Text [Matlab]
You can use dynamic fieldnames: https://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.html Alt...

4 días ago | 1

Answered
Error using accumarray First input SUBS must contain positive integer subscripts.
"I have already read all questions and answers about it here, cant figure out whats wrong." After reading many answers, you sho...

5 días ago | 0

Answered
Find cells that start with text and combine it with next cell
>> C = {'Test1';'10v';'20va';'30v';'50v';'65v';'Test2';'80v';'100v'} C = 'Test1' '10v' '20va' '30v' '...

6 días ago | 1

| accepted

Answered
Move selected column from a matrix to another
Replace the loop with this: idx = M(310,:)>=Xmin & M(310,:)<=Xmax & M(620,:)>=Ymin & M(620,:)<=Ymax; x(:,idx) = M(:,idx); Not...

6 días ago | 0

| accepted

Answered
Create variable from an excel entry
This should get you started (note that I named the variable out rather than Plot, as it is bad practice to use names which only ...

6 días ago | 0

Answered
Main diagonal operations problem
Using Roger Stafford's FEX submission randfixedsum (must be downloaded first): https://www.mathworks.com/matlabcentral/fileexch...

6 días ago | 2

| accepted

Answered
Mean matrix of different size matrices in one cell array
C = cellfun(@(m)mean(m,1),A, 'uni',0); B = cat(1,C{:})

6 días ago | 0

| accepted

Answered
Position of the left nearest one value in a vector
>> v = [0,0,1,0,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0] v = 0 0 1 0 0 0 1 1 1 1 0 0 ...

6 días ago | 0

Submitted


Next Available Filename
Returns the next unused file or folder name. The name is created by incrementing a numbered suffix.

7 días ago | 9 downloads |

Thumbnail

Answered
remove repeated rows to produce two new matrices
An old-fashioned way: a = [0.359883241;0.277815278;0.247562838;0.26249033;0.226989582;0.213157025;0.207067988;0.204762201] b =...

7 días ago | 0

Answered
Count how many elements are present inside arrays
>> A = hist(P,V) A = 2 2 2 1 2 1 2 2 2 2 1 1 1 >> B = hist(F,V) B = 2 1 2 1 2 0 2...

7 días ago | 0

| accepted

Answered
How can I prealloate a comlex-valued matrix?
"How can I prealloate a comlex-valued matrix?" A = complex(zeros(10000,500)); ... your loop here https://www.mathworks.com/he...

7 días ago | 1

Answered
How to change function coefficients?
Following the guidelines given in the MATLAB documentation: https://www.mathworks.com/help/matlab/math/parameterizing-functions...

8 días ago | 1

Answered
mkdir and simulations problems
You can download my FEX submission nextname: https://www.mathworks.com/matlabcentral/fileexchange/64108-next-available-filename...

8 días ago | 1

| accepted

Answered
How to set up Vectorization properly?
>> reshape(bsxfun(@plus,(1:4).',0:16:16*3),1,[]) ans = 1 2 3 4 17 18 19 20 33 34 35 36 49 50 51 52 MATLAB ve...

8 días ago | 0

| accepted

Answered
Image display with uint8 and double
It seems that you have a "binary" image with values 0 and 1, which is stored as uint8. Because floating-point images are assume...

8 días ago | 1

| accepted

Answered
could anyone help me how to display the position of all the numbers present in matrix.
A simple method that includes all numbers (because zeros are also numbers): >> A = [1,2,3,0;5,6,0,8;9,10,11,12] A = 1 ...

8 días ago | 0

Answered
Finding the average by excluding some values
>> Area= [ 1 2 3 4 5 1 1 1 1 12 2 3 4 5 121 145 190 500]; >> mean(Area(Area>10)) ans = 193.6

8 días ago | 0

Answered
storing data in a matrix from a nested loop
No loops required: >> d1 = [0,0,2;0,0,-2] d1 = 0 0 2 0 0 -2 >> d2 = [0,0,15;0,0,13] d2 = 0 ...

9 días ago | 1

Answered
could anyone help me to calculate the euclidean distance for the matrix.
>> B = sqrt(sum(bsxfun(@minus,permute(A,[1,3,2]),permute(A,[3,1,2])).^2,3)) B = 0.00000 2.99851 2.56248 0.72363 2...

9 días ago | 0

| accepted

Answered
image the same and different
You swapped the order of the output arguments when you called the function. Here is the function definition: function [transfo...

9 días ago | 0

| accepted

Answered
Subtract raws of a matrix from an array
MATLAB versions prior to R2016b: >> C = bsxfun(@minus,Q,M) C = 9 4 11 5 7 5 6 9 9 9 11 7...

9 días ago | 0

| accepted

Answered
Count the number of same elements in an array
Your 1st example: >> V = [ 1 2 4 3 4 2 3 5 6 4 5 6 8 4 2 3 5 7 8 5 3 1 3 5 7 8 9 5 3 2 4 6 7 8]; >> C = hist(V,1:max(V)) C = ...

9 días ago | 2

Load more