回答済み
How to extract data to a matrix from cell arrays with varying cell lengths?
xy = cat(1,cell_array{:}); x = xy(:,1) y = xy(:,2)

11日 前 | 0

回答済み
How to reshape nested cell arrays in a table
t(:,2:4)=varfun(@(x) {reshape(x{:},4,12)},t(:,2:4))

11日 前 | 0

| 採用済み

回答済み
Replace rows in one array with values from another column
v1(v1==5)=v2 % where v1 is array with 5s

11日 前 | 0

| 採用済み

回答済み
pick up elements from a cell array and the result must be a cell array
cellfun(@(x) reshape(x(1:end-1),[],1), V,'un',0)

11日 前 | 0

回答済み
Call pts with z value within a range
z = A(:,3); result_B = A((z>1)&(z<9),:)

11日 前 | 0

| 採用済み

回答済み
Double = in one line of code
doc deal

12日 前 | 2

質問


Why does gpuArray() error out?
What does the error mean? >> A = gpuArray( rand(1024) ); There is a problem with the graphics driver or with this GPU device...

12日 前 | 1 件の回答 | 0

1

回答

回答済み
selecting specific layers in the 3rd dimension of a matric
squeeze(mean(A(:,:,43:53)))

12日 前 | 0

| 採用済み

回答済み
Transferring cell array elements into a matrix
test_ca = {[1 2 3],[4 5 6];[7 8 9],[10 11 12]} .'; new_mat = cat(1,test_ca{:})

12日 前 | 0

| 採用済み

回答済み
Calculate statistical parameters from certain rows of a matrix
Wanted=splitapply(@mean,x(:,2),findgroups(x(:,1))) % x(:,1) is Day and x(:,2) is Temperature % or if you're using version prior...

13日 前 | 0

| 採用済み

回答済み
breaking a large table into smaller one
ix = diff([0,X,size(x,1)]); % x your table Wanted = mat2cell(x,ix)

13日 前 | 0

| 採用済み

回答済み
Need to Split a column of type 'string' in a Table in to group of 4 characters giving new names to the result.
v=regexp(strrep(T.Data,' ',''),'\w{4}','match');% naming a table with a variable name table is a terrible idea (will hinder the ...

14日 前 | 1

回答済み
Assign value in a cell with a "oneliner"
[x{2},x{4}]=deal('x','z')

16日 前 | 1

| 採用済み

回答済み
how to call nested structure and cell array?
[data.timepoints.time]

16日 前 | 0

回答済み
ask to change input values and derive a new matrix
I was blind sided in your previous question (because some of your questions were a bit advanced), but you seem to be asking the ...

16日 前 | 0

| 採用済み

回答済み
count numbers greater than zero, and determine among them has the highest number of count
W = sum(Y>0,2) Z = max(W)

16日 前 | 0

| 採用済み

回答済み
How to use a single command to deals with elements?
<https://in.mathworks.com/help/matlab/getting-started-with-matlab.html> - get to know the basics as soon as possible, so you don...

16日 前 | 1

回答済み
adding structure in a table
https://in.mathworks.com/help/matlab/ref/table.html#mw_eed92014-a41e-4ffa-a43d-4f1b948c083c - follow the instructions in the lin...

16日 前 | 0

回答済み
How to decompose and expand a vector into ones
ones(sum(I)*12,1)

17日 前 | 0

回答済み
could anyone help me to solve the issue
ix = [repmat('%.4f ',1,size(a,2)-1),'%.4f\n']; % where a is your matrix fprintf(ix,a.') % or perhaps you need result = sprint...

17日 前 | 0

| 採用済み

回答済み
Why function need more variables
time = ... some values data = ... some values f = freq(time,data) % this is how you call a function Google "how to call a fun...

17日 前 | 0

回答済み
How to add numeric values to table description?
t.Properties.Description = "This table is the data from user number " + a; % or t.Properties.Description= sprintf('This table ...

17日 前 | 0

| 採用済み

回答済み
making each column a stand alone variable
Wanted = num2cell(E,1) % keep it this way, don't think of naming etc, etc...,

17日 前 | 0

回答済み
Extracting and sorting data in a column
Works for odd as well as even number of elements: NewMx = max(reshape([Mx(:);... -Inf(mod(numel(Mx),2))],2,[])) % thank y...

17日 前 | 0

回答済み
Average of matrix element
cumsum(matrix)./(1:numel(matrix)) % where matrix is a column vector

17日 前 | 0

回答済み
Row Number Returned During Iterations
Iterator indicates which row satisfied that condition , so why not save it?

17日 前 | 0

| 採用済み

回答済み
displaying the sorted result
Use sort() and fprintf().

17日 前 | 0

| 採用済み

回答済み
how to select particular rows of a column vector repeatedly?
I’m not exactly sure what you mean, perhaps: vector(repmat([3,4,5],1,10)) edit: vector(sort([3:12:360,4:12:360,5:12...

17日 前 | 0

| 採用済み

回答済み
Maximum values of an matrix
Values=sort(A(:),'descend'); Values(2) % 2 - second max value

18日 前 | 1

| 採用済み

Load more