Community Profile

photo

Stephen23


Active since 2014

Suspensa Vix Via Fit

Statistics

All
  • Most Accepted 2022
  • Most Accepted 2021
  • Personal Best Downloads Level 5
  • Editor's Pick
  • Grand Master
  • First Review
  • 5-Star Galaxy Level 5
  • GitHub Submissions Level 3
  • First Submission
  • 36 Month Streak
  • Thankful Level 5
  • Revival Level 2

View badges

Content Feed

View by

Answered
Why are my variables saving only Nan entries?
Cal.data_Txx = ((E) ./ (1 - Cal.data_nu.^2)) .* (Cal.data_epsilon_1 + Cal.data_nu .* Cal.data_epsilon_2); Cal.data_Tyy = ((E) ....

3 days ago | 0

Answered
Split array into groups of close numbers
a = [1,2,3,10,11]; n = 2; x = kmeans(a(:),n) c = accumarray(x,a(:),[],@(a){a})

3 days ago | 0

| accepted

Answered
convert a cell (Rx1 cell) to a vector (Rx1 double)
"but it is not clear to me why it transforms 270x1 cell into a vector 257x1 double" It is easy to check your data (you have bee...

4 days ago | 1

Answered
Loading files by replacing some part of the name with a variable
Do NOT name each variable dynamically. Unless you want to force yourself into writing slow, complex, inefficient, insecure, obfu...

7 days ago | 0

Submitted


Hyphenate
Word hyphenation using Franklin Mark Liang's algorithm (aka Knuth-Liang algorithm). Used in TeX and LaTeX

11 days ago | 4 downloads |

Thumbnail

Answered
Array of ASCII Characters to String
Forget about loops and doing everything one-at-a-time as if MATLAB was some poor low-level language. Think in terms of arrays a...

11 days ago | 0

| accepted

Answered
error using the function 'splitapply'
S = load('matrix_out_12.mat') % LOAD is better than IMPORTDATA max_matrix_out = max(S.matrix_out(:,2)); max_matrix_out_r = flo...

11 days ago | 0

| accepted

Answered
how to know first element in Data struct
arrayfun(@(s)s.data(1),Sis)

12 days ago | 0

| accepted

Answered
Convert matrix from 3d to 4d?
Where M is your array: N = permute(M,[1,2,4,3])

13 days ago | 0

Answered
Readtable importing variables from wrong sheet
ImpOpts = detectImportOptions(FullPath, "Sheet",2); ImpOpts.PreserveVariableNames = true; MeasData = readtable(FullPath, ImpO...

13 days ago | 0

| accepted

Answered
Fields of Struct are not changing with functions
" even i am calling the app struct inside the functions and I am changing the fields of frame and max range, the actual app.fram...

13 days ago | 0

| accepted

Answered
How can I compress a table
"How can I compress them so that al of the data of one year is stored in one row. (as in the picture below?" Your screenshot sh...

13 days ago | 1

| accepted

Answered
How can I merge two arrays in adjacent cells?.
X = [1,2,3]; Y = [4,5,6]; C = arrayfun(@horzcat,X,Y, 'uni',0)

13 days ago | 0

Answered
How to reshape data in 4-D array correctly?
You can use PERMUTE like this: v = 1:16; z = permute(reshape(v,[2,2,2,2]),[4,3,2,1]); z(1,1,1,1) z(1,1,1,2) z(1,1,2,1)

14 days ago | 0

Answered
Why does Readtable return NaN for values greater than 1000?
Ugh, double-quoting number values really is an abuse of CSV norms. Note that is not possible to simply remove/ignore the double ...

15 days ago | 1

| accepted

Submitted


Interactive Regular Expression Tool
Develop and refine regular expressions in an interactive figure that shows all of REGEXP's outputs.

16 days ago | 19 downloads |

Thumbnail

Answered
i have a erorr with echo when i use soundsc command
MATLAB has a function named ECHO, which has no output arguments: https://www.mathworks.com/help/matlab/ref/echo.html This is w...

16 days ago | 0

Answered
Error with matrix size
The size of the matrix A is not important. The size of the RHS of the "=" is important. Lets check that size: A = rand(9,9); B...

16 days ago | 0

| accepted

Answered
how to suggest a name to save
You could download my function NEXTNAME and use it to provide the name: https://www.mathworks.com/matlabcentral/fileexchange/64...

16 days ago | 0

Submitted


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

17 days ago | 9 downloads |

Thumbnail

Answered
Converting unix time stamp to datatime
You got the ticks wrong: those values given in the DT field are simply counts of the seconds since the epoch (which is the defin...

18 days ago | 0

| accepted

Answered
how can I get a list of the countries used by the mapping toolbox as a cell array?
The regions used by WORLDMAP are (note that this is in a private directory, is subject to change, use at own risk): F = fullfil...

19 days ago | 0

Answered
How to concatenate the elements of the structure?
Where S is your structure and F is the relevant field: cat(3,S.F) https://www.mathworks.com/matlabcentral/answers/1656435-tuto...

19 days ago | 0

| accepted

Answered
concatenating the rows to have a column wise data
The MATLAB approach: T = readtable('data.csv', 'VariableNamingRule','Preserve') P = digitsPattern+":"+digitsPattern; U = stac...

20 days ago | 0

Answered
Matlab function assumed inputs
The simplest approach is to use the ARGUMENTS block: https://www.mathworks.com/help/matlab/ref/arguments.html https://www.math...

25 days ago | 1

Answered
Order of code execution seems weird
Try calling DRAWNOW after setting the editfield values.

25 days ago | 1

| accepted

Answered
how to zero pad a vector to have the same amount of data as a vector with more data?
Simpler: in(end+1:numel(verb)) = 0;

28 days ago | 2

Answered
sorting list of structures in a structure
It is unclear what the problem is, because you did not explain or show either the "wrong" order nor the "right" order. If you wa...

28 days ago | 0

| accepted

Answered
Help with Pre-allocating function values
The MATLAB approach: lf = [697,770,852,941]; hf = [1209,1336,1477]; [X,Y] = meshgrid(lf,hf); f = [X(:),Y(:)] Or T = comb...

30 days ago | 1

| accepted

Answered
I have a problem in my code. Who can help me to fix it?.. I can't find my mistake. Please help me.
Rather than forcing pseudo-indices into variable names and then attempting to use STR2FUNC.... simply use a cell array: lambda ...

1 month ago | 1

| accepted

Load more