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

9 giorni ago | 0

| accepted

Answered
Double = in one line of code
doc deal

10 giorni ago | 2

Question


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...

10 giorni ago | 1 answer | 0

1

answer

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

10 giorni ago | 0

| accepted

Answered
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{:})

11 giorni ago | 0

| accepted

Answered
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...

11 giorni ago | 0

| accepted

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

11 giorni ago | 0

| accepted

Answered
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 ...

12 giorni ago | 1

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

14 giorni ago | 1

| accepted

Answered
how to call nested structure and cell array?
[data.timepoints.time]

14 giorni ago | 0

Answered
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 ...

14 giorni ago | 0

| accepted

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

14 giorni ago | 0

| accepted

Answered
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...

14 giorni ago | 1

Answered
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...

14 giorni ago | 0

Answered
How to decompose and expand a vector into ones
ones(sum(I)*12,1)

15 giorni ago | 0

Answered
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...

15 giorni ago | 0

| accepted

Answered
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...

15 giorni ago | 0

Answered
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 ...

15 giorni ago | 0

| accepted

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

15 giorni ago | 0

Answered
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...

15 giorni ago | 0

Answered
Average of matrix element
cumsum(matrix)./(1:numel(matrix)) % where matrix is a column vector

15 giorni ago | 0

Answered
Row Number Returned During Iterations
Iterator indicates which row satisfied that condition , so why not save it?

15 giorni ago | 0

| accepted

Answered
displaying the sorted result
Use sort() and fprintf().

15 giorni ago | 0

| accepted

Answered
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...

15 giorni ago | 0

| accepted

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

16 giorni ago | 1

| accepted

Answered
Plot a vector with different colors on selected data
No loops needed: v = reshape(vector,100,[]); plot(v(:,1:2:end),'r') hold on plot(v(:,2:2:end),'b')

16 giorni ago | 1

Answered
How to fill a cell array without using a loop
I'm not sure of any other method but here is one with implicit loop: c = arrayfun(@(x) -x:x, a,'un',0) celldisp(c) Or another...

16 giorni ago | 1

| accepted

Answered
How to find in cell structures?
v=cellfun(@(x) any( x == 5 ), yourcell); Wanted = find(v) % Adam was almost right , but a minute tweak

16 giorni ago | 0

| accepted

Answered
Converting cell arrays back to matrix
cell2mat(mat_cell)

16 giorni ago | 0

Load more