Community Profile

photo

Andrei Bobrov


4,659 total contributions since 2011

Andrei Bobrov's Badges

  • Thankful Level 3
  • Master
  • 36 Month Streak
  • Revival Level 2
  • Knowledgeable Level 4
  • First Answer
  • Scavenger Finisher
  • CUP Challenge Master
  • Commenter
  • Leader
  • Speed Demon
  • Solver

View details...

Contributions in
View by

Answered
Vector operations not working correctly
cvPredictions = pval < epsilon;

약 21시간 ago | 0

| accepted

Answered
Replace numbers into a vector starts at the center? Looking for general format
vec =[0 0 0 0 0 ]; vec1 = [1 1 1]; z = pad(join(string(vec1),''),numel(vec),'both','0'); out = z{:} - '0'

3일 ago | 1

Answered
How to delete numbers from cell?
a = {'0,31:1.03 SPEED MEASURED 1 [rpm]' '0,31:1.04 MOTOR SPEED [rpm]' '0,31:1.08 MOTOR TORQUE [%]' '0,31:25.04 T...

4일 ago | 1

Answered
sort 2 matrices for minimum numbers sum and divide them
m = 3; r = [ 1 3 4 5 30]; x = [ 5 8 9 4 78]; out = funt(r,x,3); function out = funt(r,x,m) ad = nan(mod(-numel(r),m),...

13일 ago | 1

Answered
How to reshape and reorder a 5D arrays to 4D arrays?
Let A - your 5D array: k = size(A); out = zeros(k(1:end-1).*[1,1,2,1]); out(:,:,1:2:end,:) = A(:,:,:,:,1); out(:,:,2:2:end,:...

13일 ago | 0

| accepted

Answered
Finding a range in an array
Let A - your array. Anew = A.*(1 - 2*(A >= 20 & A <= 26.5));

21일 ago | 0

Answered
How do I compute impulse response?
You can use the filter function with the coefficients as an input argument.

26일 ago | 0

| accepted

Answered
How to convert 3 hourly data into a 6 hourly data?
In R2016b [m,n,k] = size(A); t = hours(0:3:(k-1)*3); Ar = reshape(A,m,[]); TT = table2timetable(array2table(Ar),'RowTime',t(...

30일 ago | 1

| accepted

Answered
Divide large size matrixes, multiply the small matrixes and sum the results together.
C = sum(A.*B,'all') for MATLAB < R2018b : AB = A.*B; C = sum(AB(:));

약 1달 ago | 0

Answered
creating a large matrix with a pattern
out = kron(eye(200),[1;1;0;1]); or a = [1;1;0;1;zeros(796,1)]; out = a(mod((1:800)'-(1:4:800),800)+1);

약 1달 ago | 1

Answered
Select random data from a matrix and replace it
A = [1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0]; p = 4; [ii,jj] = find(A); jjj = accumarray(ii,jj,...

약 1달 ago | 0

| accepted

Answered
Unable to use a value of type 'cell' as an index.
Use: md = cat(1,m{:}); ... mar1 = eo (md(1,1))^ (eo - 1);

약 1달 ago | 0

| accepted

Answered
How to convert row and column data into x,y,flag format?
out = [fullfact(size(BW1)),BW1(:)];

약 1달 ago | 1

Answered
filling a matrix with a loop
out = full(spdiags(ones(400,3),[0,1,3],400,400));

약 1달 ago | 0

Answered
How to apply a cell array of function handles to an array of double
In your case: out = array_double.*(2:2:6)'; General case: out = arrayfun(@(x,y)cell_array_fuction_handles{x}(y),... ...

약 1달 ago | 0

| accepted

Answered
Create a matrix with random integers between 1 and 9
[~,ii] = sort(rand(9,1)); out = reshape(ii,3,3);

약 1달 ago | 0

Answered
Multiplication of 2 3d matrices
FactorRetPf = nansum(TotWeightsPf.*NormClassRetPf,3)'; FactorRetBM = nansum(TotWeightsBM.*NormClassRetBM,3)';

약 1달 ago | 1

Answered
How to delete the duplicate number or using unique in the cell?
A={[3];[6 8 3];[5];[10 5]}; k = repelem((1:numel(A))',cellfun(@numel,A)); B = cell2mat(cellfun(@(x)x(:),A,'un',0)); [a,b] =...

약 1달 ago | 0

| accepted

Answered
vectorization of symmetrical matrix with off-diagonal vectors multiplied with 2
k = 2; o = ones(size(H)); Hl = H.*(tril(o,-1)*(k-1) + 1); out = Hl(tril(o)>0); or e = H.*((k-1)*(1-eye(size(H))) + 1); o...

약 1달 ago | 0

| accepted

Answered
How to get the corresponding logic value based on the sum of vector elements
A = [1,1,2,3,5]; my_input = 5; out = []; n = numel(A); ii = 1:n; for jj = 1:n k = nchoosek(ii,jj); r = sum(resh...

약 1달 ago | 0

| accepted

Answered
How to find out the impact of independents variables on dependent variable?
Let A - array of your data (365 x 5) : evapotranspiration, temperature, solar radiation, relative humidity and wind speed c = c...

약 1달 ago | 0

Answered
Search all elements from from array A in array B and write it workspace
Output = A(ismember(A,B))

약 1달 ago | 0

Answered
How to pick next value from vectors based on a condition?
m = 5; [value,ii] = max(A(m:end)); index = ii + m - 1;

약 1달 ago | 0

| accepted

Answered
Count the same element in a large rows of one column
Let A - your vector (421 x 1): [a,~,c] = unique(A); out = array2table([a, accumarray(c,1)],'v',{'value','times'});

약 1달 ago | 0

Answered
how to change data from 10 minutes to hour?
In R2016b: T = readtable('data.txt','ReadVariableNames',false,'Format','%q %q %f'); TT = sortrows(timetable(T.Var3,'RowTimes',...

약 1달 ago | 0

Answered
How can i find the all the positions of elements in cell and record them all in an the same cell
f = fopen('data.txt'); str = textscan(f,'%s','delimiter','\n'); fclose(f); str = regexp(str{1},'\w+','match','once'); [a,b,c] ...

약 1달 ago | 0

Answered
How can i find the sorted indexing of the array
A = [2 9 6 5 8]; n = numel(A); AA = [A;1:n]; swapped = 1; while swapped swapped = 0; for ii = 1:n-1 if AA(1,ii+1...

약 1달 ago | 0

| accepted

Answered
how to convert num to string ?
x ={... [22] '22 .8 ' [30] '39 .6 ' [44] [48] '49 .6 ' '50 .8 '}; lo = cellf...

약 2달 ago | 0

Answered
Matrix Average beside the numbers
M =[ 1 2 3 6 5 4 7 8 9]; X = conv2(M,ones(3),'same')./conv2(ones(3),ones(3),'same');

약 2달 ago | 0

Answered
How can I mat2cell the array?
out = mat2cell([v{:}],1,[3,3,4,3,3]);

약 2달 ago | 0

Load more