
Stephen23
Suspensa Vix Via Fit
Estadísticas
4 Preguntas
8.717 Respuestas
22 Archivos
CLASIFICACIÓN
5
of 281.532
REPUTACIÓN
33.695
CONTRIBUCIONES
4 Preguntas
8.717 Respuestas
ACEPTACIÓN DE RESPUESTAS
75.0%
VOTOS RECIBIDOS
5.539
CLASIFICACIÓN
94 of 19.046
REPUTACIÓN
10.694
EVALUACIÓN MEDIA
4.90
CONTRIBUCIONES
22 Archivos
DESCARGAS
881
ALL TIME DESCARGAS
83624
CLASIFICACIÓN
of 133.759
CONTRIBUCIONES
0 Problemas
0 Soluciones
PUNTUACIÓN
0
NÚMERO DE INSIGNIAS
0
CONTRIBUCIONES
0 Publicaciones
CONTRIBUCIONES
0 Público Canales
EVALUACIÓN MEDIA
CONTRIBUCIONES
0 Temas destacados
MEDIA DE ME GUSTA
Content Feed
How to process excel data with Chinese dates
"How to process excel data with Chinese dates" It is a CSV file (i.e. text), not a proprietary Excel file. fnm = '日期.csv'; ty...
alrededor de 15 horas hace | 0
Return largest number of decimal places in a vector of numbers
x = [0.123456789,0.1,0.12,0.123]; n = strlength(compose("%.15g",rem(abs(x),1)))-2
2 días hace | 1
Mix two different size arrays
A = rand(1,3) B = rand(1,7) N = min(numel(A),numel(B)); C = [reshape([A(1:N);B(1:N)],1,[]),A(N+1:end),B(N+1:end)]
3 días hace | 0
| aceptada
Split increasing vector into n unqueal parts based on multiples of n
S = load('Denc.mat'); D = S.Denc B = 0:2300:2300+max(D) X = discretize(D,B); C = accumarray(X,D,[],@(a){a})
4 días hace | 0
| aceptada
How to take a value between two values
d = [11,15,21]; X = [10.2,13.5,20,22.4]; Y = [1.6,1.8,2,Inf]; Z = interp1(X,Y,d, 'previous')
7 días hace | 0
How to change the default color order for all figures?
M = rand(5,7); plot(M) newcolors = [0.83,0.14,0.14; 1,0.54,0; 0.47,0.25,0.8; 0.25,0.8,0.54]; set(groot, "defaultaxescolororde...
8 días hace | 1
| aceptada
how to assign rank to each row?
A = [1,4;1,4;4,1;4,1;2,2;2,3;2,3;3,2;3,3] B = cumsum([1;any(diff(A,1,1),2)])
8 días hace | 0
| aceptada
Which character conversion notation do I have to use?
T = readtable('ct4004355_si_003.txt', 'Delimiter','\t', 'TextType','string')
8 días hace | 0
| aceptada
Keep matrix structure after indexing
out = nan(size(temp)); out(A) = temp(A); Or out = temp; out(~A) = NaN;
9 días hace | 1
| aceptada
Error replacing content of timetable with cell array
Note that storing lots of scalar string arrays inside a cell array is inefficient and misses out on the benefits of using string...
9 días hace | 0
| aceptada
Defining boundaries of a curve
S = load('HistogramData.mat') P = 8e-4; % prominence D1 = diff([false;S.Dat1(:,2)>P;false]); D2 = diff([false;S.Dat2(:,2)>P;f...
9 días hace | 0
| aceptada
BSXFUN Non-singleton dimensions of the two input arrays must match each other
"That should be multiplied by the first row of SV:" I am guessing that you want to repeat SV so that it has as many rows as NED...
9 días hace | 1
| aceptada
Loading file and storing variable name as double in .mlx file
To write robust code you should always LOAD into an output variable. Doing so also makes your task easier: C = struct2cell(load...
10 días hace | 0
| aceptada
Transform double to char with one or two decimal places
You could use another format, e.g.: fprintf('%.3g\n',[3.15,3.7])
10 días hace | 1
Argument validation for cell arrays?
"that the argument must be a cell array of three-vectors." You can easily write your own argument validation function: https:/...
14 días hace | 1
| aceptada
extract all rows of a matrix except 'r' (vector) rows
The most efficient approach: matrix = [54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65]; r = [1; 2; 3; 4; 9]; matrix_out = mat...
14 días hace | 0
| aceptada
Averaging a curve with itself
S = load('test.mat'); Xraw = S.cx; Yraw = S.c; [Xmin,Imin] = min(Xraw); [Xmax,Imax] = max(Xraw); I1 = Imin:Imax; I2 = [I...
14 días hace | 0
Operation with logical data. Which is better?
n = 5; a = [1,9,0,2,3]; b = a<n & a
15 días hace | 0
| aceptada
Can I create cells inside cells in for loop?
Brute force naive approach: P = perms(1:9) C = {1:3,4:6,7:9}; B = true; for k = 1:numel(C) V = C{k}; [X,~] = find(...
15 días hace | 0
Writing functions f(x,y)
fh1 = @(x,y) 4*(x-1).^2 + 3*(y-2).^2 + 2*(x-2).^2.*(y-3).^2; fh2 = @(v) fh1(v(1),v(2)); % function with one input sol = fminse...
17 días hace | 1
I would like to merge two different column in one as datetime
% Fake data: A = ones(5,1) B = {'0:00';'0:05';'0:10';'0:15';'0:20'} % Convert to DURATION: M = str2double(split(B,':')); D ...
23 días hace | 0
How to solve error "access denied" when using mkdir?
Explanation: The basic problem is that you are calling MKDIR using command syntax (not function syntax), but are expecting to p...
23 días hace | 0
| aceptada
Faster indexing from Matfiles with similar names
"What I meant when I said I had 5 matfiles called m1 to m5 is that m1 - m5 were matfile-type variables obtained by calling the m...
24 días hace | 0
| aceptada
Common Elements in Two 2D Arrays
A = [1,2,3,4,5,6; 3,1,2,4,5,7] B = [1,1,3,5,6,7; 3,1,2,4,5,7] Method one: ALL and indexing: X = all(A==B,1); C = A(:,X) Met...
27 días hace | 1
In what situations do we need to use the `empty` method? What benefits does the `empty` method provide?
"In what situations do we need to use the `empty` method?" Whenever you want to create an empty array of a certain class. Certa...
27 días hace | 1
Reading file names from a certain directory into a cell array to compare it with a different cell array
"I know how to do the comparisson just not how to get the filesnames from the directory" Use DIR: https://www.mathworks.com/he...
27 días hace | 1
How to identify blocks in a diagonal block matrix?
This is not very pretty, but it gets the job done. Note for simplicity it only handles square matrices and assumes square, non-o...
27 días hace | 1
| aceptada
Table Multiplication error: Both tables must have the same variables
One simple solution is to use curly braces to access table content (not parentheses which return another table): SAI{:,1} .*SAI...
28 días hace | 1
| aceptada
error while converting to string
"However, I want the value of m to remain 08." Numeric data classes do not store formatting information e.g. how many leading z...
28 días hace | 0
| aceptada
Why is the If Statement Not Working?
This code if i 1 | 4 is exactly equivalent to writing if i 1 | 4 where the second line is calculated and the result imm...
29 días hace | 0
| aceptada