signature of values ​​when exporting to excel?
A = A'; B = B'; C = C'; writetable(filename,table(A,B,C))

19 days ago | 0

| accepted

summation of matrix in column
final_mat = [ 1 13 25 15 11 11 14 12 12 10 14 1 14 25 15 11 11 14 12 12 ...

19 days ago | 1

| accepted

How do I determine if the desired value in a vector is the Max or Min of the values around it
x = [ 21 19 20 17 16 17 18 16 15 13 15 16]; M = x(hankel(1:3,3:numel(x))); % max [peakmax,i] = max(M); peakmax = peakmax(i ...

19 days ago | 2

Count number of times value appears in column
out = histc(FinalRanking,1:296);

21 days ago | 1

Is there an alternative way to perform the following matrix transformation?
i = 3; [m,n] = size(A); j = hankel(1:i,i:m); out = A(sub2ind([m,n],kron(j,ones(1,n)),repmat(1:n,i,m-n+1))); or in your case ...

22 days ago | 0

| accepted

Find set of values that are unique to the values in another column
[G,d] = findgroups(A(:,1)); out = [d,splitapply(@mean,A(:,2),G)];

22 days ago | 1

Extract Min, Max and mean values for each month of each respective year. (Excel Data)

22 days ago | 0

How to check ismember in a cell in Matlab?
result = cellfun(@(x)all(x == B{:}),List);

2 months ago | 0

Solving an equation with one variable
syms q a t E k1 k2 y eq = (q*a^4/(E*t^4)) == k1*y/t + k2*(y/t)^3; sol = solve(eq,y,'MaxDegree', 3);

2 months ago | 0

Reshaping 2d array
As in comment by Sebastian Bomberg's (for MATLAB >= R2016b): % Let A - your data of energy (150120 x 5 double) TT = array2time...

2 months ago | 0

| accepted

Matrix multiply with a function
i = [1:3;2,3,1;3:-1:1]; k = [.5;.78;.1]; f = [3;4;8]; d=[2 3 4;7 2 5;1 2 5]; l = k(i).*d + f(i); or l = kron(k(i),d) + k...

2 months ago | 1

| accepted

Combination of 4 Element
bl = cellfun(@(x)x(:)',bl,'un',0); n = numel(bl); ii = cell(n,1); for i = 1:n ii{i} = num2cell(nchoosek(1:4,i),2); end...

2 months ago | 0

Vectorisation of code for insertion of n x n matrices in a 3D array along the diagonal of a large matrix
A = full(gallery('tridiag',Z(n,1,:),cat(3,Z(1,1,1),Z(n,n,1:end-1)+Z(1,1,2:end),Z(n,n,end)),Z(1,n,:)));

2 months ago | 0

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 3-by-3.
A = kron(diag([1 1],1),I) + kron(diag([1 1],-1),I) + kron(eye(3),T);

2 months ago | 0

combinations with 2 columns
Combination = fullfact([2 2 2]);

2 months ago | 0

How to select every nth value with the last value fixed from a column?
a = original_vector([100:100:4901,4901]);

2 months ago | 0

Integrating function of t over numerical values
F = str2func(vectorize(FUN)); Q = integral(F,0,6);

2 months ago | 0

How can I sort a matrix elementwise ?
A = [3, 4 ; 6, 2]; [m,~] = size(A); [B,i] = sort(A(:)); index = [mod(i-1,m) + 1, ceil(i/m)];

2 months ago | 0

| accepted

How can I find the exact value of the corresponding point in specific longitude and latitude?

2 months ago | 0

Evaluation of function handler
F = F(x,y)x + y; FF = @(x)F(x,2);

2 months ago | 0

how to covert matlab time to actual time
T = readtable('SMPS1.xlsx','Sheet','Data','Range','1:481'); T.Time = dateshift(datetime(T.Date,'InputFormat','MM/dd/uuuu') + se...

2 months ago | 0

| accepted

Generating Daily Values using Hourly Values
T = readtable('your_xlsx_file.xlsx'); t = datetime([T{:,1:4}, zeros(size(T,1),2)]); TT = timetable(T{:,end},'RowTimes',t) ; T...

2 months ago | 1

| accepted

how can I find a specific data in time table in matlab?
i = diff(3*(data_mean_daily.tabrizmat7 < -3) + (data_mean_daily.tabrizmat7 > 1)) == -2; T_out = data_mean_daily([i;false]|[fals...

2 months ago | 0

| accepted

Convolution Coding in Matlab
h = conv(f,g,'valid')

2 months ago | 0

| accepted

Display char matrix vertically
volt = [18 33 31 34 15 37 10.5 48 50 38 35 39 42 33 31 1 5 9 13 11 27 35 -1 46 22 6 19 36]; edges = -40:10:0; [~,~,j] = histco...

2 months ago | 0

Replace Number array with characters
volt = [18 33 31 34 15 37 10.5 48 50 38 35 39 42 33 31 1 5 9 13 11 27 35 -1 46 22 6 19 36]; edges = [-inf,0:10:40,inf]; frui...

2 months ago | 0

How to include a switch statement within a for loop?
% Parameters a_R = 0.0325; a_T = 0.0325; N_T = 164; N_R = 10; mu_0 = 4*pi*(10^-7); f_Array = [10000,20000,40000]; w = 2*p...

2 months ago | 0

| accepted

Integers without repeating consecutively
function [repPos, pinCodeFix] = pinCodeCheck(pinCode) lo = [true;diff(pinCode(:)) ~= 0]; repPos = find(~lo); pinC...

2 months ago | 0

How can I insert a smaller ones matrix into a larger zeros matrix?
AA = [5:12;ones(5,1)*[0 8 8 8 0 5 5 5]] AA(end-1:end,1:5) = 1; AA(4,7) = 7; eq7 = AA == 7; le7 = AA <= 7; gt7 = AA > 7; ...

2 months ago | 0