Community Profile

photo

madhan ravi


3,297 2018 年以降の合計貢献数

Communication through MATLAB is always better than arguing.

madhan ravi's バッジ

  • Thankful Level 4
  • 12 Month Streak
  • Ace
  • Knowledgeable Level 4
  • Promoter
  • Commenter
  • Revival Level 3
  • Solver
  • First Answer

詳細を表示...

貢献した分野
表示方法

回答済み
Matrix dimensions must agree problem.
tx1.*tx2(:) % error is gone who knows if the logic is right. times(tx1,tx2(:)) % bsxfun(@times,tx1,tx2(:)) if 2016a <

2日 前 | 0

回答済み
how to convert a 3*3 matrix into 1*9 using for loop
reshape(matrix,1,[]) % no loops needed , the beauty of MATLAB is the tasks are far simpler than most think.

3日 前 | 2

回答済み
How does one accept an answer?
Only one answer can be accepted, as you have figured it out unaccepting and accepting the latter which you find useful for the n...

3日 前 | 1

| 採用済み

回答済み
filling array with data
Abweichung=nan(size(Schlusskurs(:,1))); ii = T:-1:2; for k = 1:numel(ii) Abweichung(k) = log(Schlusskurs(ii(k)-1,1)/Schl...

3日 前 | 0

回答済み
Find mean of rows containing decimal numbers in between integers in a column
Y = [1 0.098 0.00076 0.01 2 0.099 0.007 2 0.003 0.04 0.1 4]; Y=Y(:); ix=diff(find(~mod(Y,1)))-1; assert(nnz(~mod(Y,1))>2,'atl...

3日 前 | 1

| 採用済み

回答済み
Searching matrix which contain specific value?
any(matrix(:)==value) % 1 means true ,false otherwise

4日 前 | 1

回答済み
How to assign vectors to existing vector
newvector_2=vector_2; ix=nnz(~vector_2); v12=[vector_1,nonzeros(vector_2).']; u=unique(v12); d=setdiff(1:max(v12),v12); new...

5日 前 | 0

回答済み
maximum value of matrix
[Val,ix]=max(A(:)); [r,~]=ind2sub(size(A),ix); A(r,:) %complete row where maximum exists

5日 前 | 1

| 採用済み

回答済み
.mlx with MATLAB mobile
<https://in.mathworks.com/products/matlab-mobile.html> - see under *Limitations*

5日 前 | 0

回答済み
Datetime shows month name and not number
Change *InputFormat* to *Format*.

5日 前 | 0

| 採用済み

回答済み
how to create a vector with if-else statement
Bc(k) >= z(k)

5日 前 | 0

| 採用済み

回答済み
Storing the inputs of a function on a structure (or cell or array)
d=struct('x',1,'y',2); [z,w] = tempFun(d) function [z,w] = tempFun(s) z = s.x+1; w = s.y+1; end

5日 前 | 0

| 採用済み

回答済み
Split array based on given indices
C=A(B) D=setdiff(A,C)

6日 前 | 0

| 採用済み

質問


How to append a field to an existing structure in a mat file?
s.a = rand; s.b = rand(2); save('s.mat','s') load s s.c = 'yes' save('s.mat','s') % now the new field is added Is there a...

6日 前 | 1 件の回答 | 0

1

回答

質問


Is there any other way to use coder for accumarray() ?
As stated in the documentation there are some limitations to some functions including accumarray(). Is there any other way to fe...

6日 前 | 1 件の回答 | 0

1

回答

質問


Which way is better?
Note: This is not about preallocating variable in a loop. This is for general case. For instance: a(10,10) = 10; % the rest ar...

6日 前 | 1 件の回答 | 1

1

回答

回答済み
How to reshape every cell in a structure
arrayfun(@(x) reshape(b(x).a, 12, 4), 1:numel(b), 'UniformOutput', false)

6日 前 | 0

| 採用済み

回答済み
how to add a new column to a table. The length of the column is longer and want to add from the first row till the last row of current table and neglect the rest of the column
Wanted = [T1,T2(1:size(T1,1),:)] %T1 table with 500 rows and the other with 1000 rows

6日 前 | 0

| 採用済み

回答済み
how to sum elements of a cell array
sum(cat(3,V{:}),3)

6日 前 | 0

| 採用済み

回答済み
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)

6日 前 | 0

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

6日 前 | 0

| 採用済み

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

7日 前 | 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)

7日 前 | 0

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

7日 前 | 0

| 採用済み

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

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

8日 前 | 1 件の回答 | 0

1

回答

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

8日 前 | 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{:})

8日 前 | 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...

9日 前 | 0

| 採用済み

Load more