Stephen23
Suspensa Vix Via Fit
Statistics
RANK
5
of 277,486
REPUTATION
32,950
CONTRIBUTIONS
4 Questions
8,543 Answers
ANSWER ACCEPTANCE
75.0%
VOTES RECEIVED
5,420
RANK
106 of 18,674
REPUTATION
10,106
AVERAGE RATING
4.90
CONTRIBUTIONS
21 Files
DOWNLOADS
1067
ALL TIME DOWNLOADS
79235
RANK
of 127,106
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
How to sorting categorical array for plotting
By default the categories are sorted into character order, not alphanumeric order. S = "M"+(1:10); A = categorical(S) C = cat...
16 hours ago | 0
| accepted
Select last numeric character(s) of the string
"How can I extract the last numbers occurring at the end of different strings?" X = "sucrose-10"; Y = str2double(regexp(X,'[-...
18 hours ago | 2
Compensate the vector with the last entry
V = [2,4,7,3]; K = 8; V(end+1:K) = V(end)
20 hours ago | 0
why the code is incorrect? and where is incorrect? Matlab told me the function is incorrect, why?
"why the code is incorrect?" FZERO expects its first input argument to be a function handle: /help/ma...
2 days ago | 0
find equal value into cell
Forget about loops and FIND and ISMEMBER and other fiddling around, you should be using OUTERJOIN command. If your data are nice...
3 days ago | 0
Submitted
Number to Words
Convert a numeric to a string with the English name of the number value (GB/IN/US).
4 days ago | 14 downloads |
Submitted
Words to Number
Convert English number name/s written in a string to numeric value/s (GB/US).
4 days ago | 1 download |
Using App Designer, reading a numeric edit field and creating a double array from the inputs?
The reason why it is a cell array is because you told MATLAB to make a cell array. Basically you are doing this: fc1 = 1; fc2 ...
4 days ago | 0
| accepted
Getting all values in the same field for different entries within a structure
"Is it possible to get all the different math grades in an array without a for-loop?" Of course. The simple and efficient MATL...
4 days ago | 0
How to change HH:mm:ss:SSS to HH:mm:ss.SSS for a column?
time = {'01:18:34:754'; '13:04:19:999'}; data = rand(2,1); T = table(time,data) tmp = regexprep(T.time,':(?=\d{3})','.'); T....
5 days ago | 0
error when using '>' , Operator '>' is not supported for operands of type 'table'.
if significant{i,j} > 2 % ^ ^ /help/matlab/matlab_prog/access-data-in-a-table.html
5 days ago | 0
Copy variables into excel smoothly
"So I wonder how I can work around this?" Don't copy-paste data into Excel. The simple, easy, robust approach is to use WRITEMA...
5 days ago | 1
| accepted
Fill a matrix with another buy keep the original size
A = zeros(5,5); B = rand(3,5); A(1:size(B,1),:) = B /help/matlab/getting-started-with-matlab.html
5 days ago | 1
| accepted
Adding to existing date value
"Using caldays does not update the month" Yes, it does: dt = datetime(2023,3,27, 'Format','u-MM-dd') dt = dt+caldays(5) Appa...
6 days ago | 0
Why is NaN returned when I have all necessary input data?
"Does anyone see my mistake?" Your data has a range of approx 0.166: how many peaks do you expect to get with minimum peak prom...
6 days ago | 0
How do I change the name of a variable (actually value of a character array) inside a loop?
"I do not see any oher solution then to edit the name while in the loop." What you are asking is just to change some text. This...
6 days ago | 0
| accepted
regexp string to numeric array
Assuming that every string contains exactly the same number of numeric data: str = {'bob22alice666buster2', 'donald42lisa00budd...
6 days ago | 0
finding a numeric pattern in a vector
Your basic concept is okay. You need to select an appropriate character match and quantifier. Note that the asterisk is actually...
6 days ago | 0
| accepted
Merging Date and time
Rather than fiddling after importing, the best approach is to import the file correctly using READTABLE options, e.g.: fnm = 'L...
6 days ago | 2
| accepted
Efficient way to convert m by n array into a single column table with each row containing n by 1 array?
A = [1 3 5; 2 6 7; 5 8 9; 3 2 1]; T = cell2table(num2cell(A.',1).')
7 days ago | 0
| accepted
Rearrange cell array of strings based on occurrence in another cell array of string
Assuming that every text in B contains exactly one text from A, and that every text in A occurs in B: A = {'test1', 'test2', 't...
8 days ago | 0
| accepted
I don't know how to use if function with or operator
The simple MATLAB approach: if any(data(i,1)==[0,0.0625,0.125,0.25,0.5,1,2,4,8,16,32]) or even simpler: if any(data(i,1)==[0,...
9 days ago | 2
readmatrix error: "filename" must be a string scalar or character vector.
Get rid of DIR from inside the loop. P = 'C:\Users\aasyuda\Documents\CV-EIS\aptamer-histamin\14April2023\14April2023\0p0001nM';...
9 days ago | 0
Writing txt files accurately with a restriction on the number of columns.
V = randi(123,1,23) T = sprintf('%g,',V); U = regexprep(T,'(.{1,13}),','$1\n'); % e.g. max 13 columns fprintf('%s',U) And if...
10 days ago | 2
How do I put spaces before a line in a txt file using strcat and fprintf?
STRCAT removes whitespace characters. The easy and robust approach is separate FPRINTF calls: fprintf(fid_wrt,' \n') fprintf...
10 days ago | 0
Generate comma separated list in single line of code?
A one-line approach that has been possible since R2019b: struct('x',{'A','B','C','D'}).x /help/releas...
11 days ago | 0
compare variable with different data types
Here is a neat approach that also allows case-insensitivity: x = 'Yes'; % x can be char, string, logical, or numerical if strc...
12 days ago | 0
| accepted
Concatenate all arrays from a field in a structure
Where S is your structure: A = vertcat(S.A) B = vertcat(S.B) etc. /matlabcentral/answers/1656435-tu...
13 days ago | 1
| accepted
Access and extract table array using for loop
"I need to extract (or access) the data using "for loop". For example, from "ECG", we can extract the data from 0 sec, 10 sec, 2...
13 days ago | 0
Merging empty vector with double
"if B is empty, I want it to be shown as 9 zeros" A = [1;2;3;4;5;6;7;8;9]; B = []; C = []; C(1:numel(A),1) = A; C(1:numel(B...
13 days ago | 0
| accepted