3,165 total contributions since 2018

Communication through MATLAB is always better than arguing.

Answered

importfile regexp thousands separator returns NaN when negative

str2double(regexprep(numbers,',',''))

importfile regexp thousands separator returns NaN when negative

str2double(regexprep(numbers,',',''))

9 hours ago | 0

| accepted

Answered

setting in command window in Matlab?

https://in.mathworks.com/matlabcentral/answers/182333-if-my-editor-window-became-undocked-how-do-i-dock-it-again-picture-inside#...

setting in command window in Matlab?

https://in.mathworks.com/matlabcentral/answers/182333-if-my-editor-window-became-undocked-how-do-i-dock-it-again-picture-inside#...

4 days ago | 0

Answered

I need to create a cell array initializing each element in it to 3*1 null matrix.

Simpler without loop: F(:) = {zeros(3,1)}

I need to create a cell array initializing each element in it to 3*1 null matrix.

Simpler without loop: F(:) = {zeros(3,1)}

4 days ago | 0

| accepted

Answered

Problem using ODE45 function

You haven't defined sigma anywhere , I suggest you use a different name for example Sigma because there exists a function named...

Problem using ODE45 function

You haven't defined sigma anywhere , I suggest you use a different name for example Sigma because there exists a function named...

4 days ago | 0

| accepted

Answered

I need Personal Invoice

If you have bought any of the MATHWORKS product , you should be better of contacting Mathworks Support Team by click the Contact...

I need Personal Invoice

If you have bought any of the MATHWORKS product , you should be better of contacting Mathworks Support Team by click the Contact...

5 days ago | 0

Answered

How do I use two nested for loops to store the calculated values from a given equation in a 2 dimensional array?

% With Loop t=[0,0.1,0.2,0.3,0.4]; f=[0,0,10,15,20]; M = numel(t); N = numel(f); X=zeros(M,N); for ii = 1:M for jj = ...

How do I use two nested for loops to store the calculated values from a given equation in a 2 dimensional array?

% With Loop t=[0,0.1,0.2,0.3,0.4]; f=[0,0,10,15,20]; M = numel(t); N = numel(f); X=zeros(M,N); for ii = 1:M for jj = ...

5 days ago | 0

| accepted

Answered

Sum according to the values in another column

[u,~,idx]=unique(C1(:)); Wanted = [u,accumarray(idx,C2,[],@sum)]

Sum according to the values in another column

[u,~,idx]=unique(C1(:)); Wanted = [u,accumarray(idx,C2,[],@sum)]

7 days ago | 0

Answered

Error Using a loop: Conversion to double from cell is not possible.

Proj = cell(10,1); % outside loop Proj{w} = ... % inside loop , leave the rest unchanged

Error Using a loop: Conversion to double from cell is not possible.

Proj = cell(10,1); % outside loop Proj{w} = ... % inside loop , leave the rest unchanged

7 days ago | 3

Question

What is crystal ball?

I have seen some comments by some of the answered referring to crystal ball, been bugging for days. Does it actually suggest you...

7 days ago | 1 answer | 1

Answered

Extracting numbers from array of cells

V = regexp(my_data_string,'\d+[\.]?\d*','match','once'); Wanted = str2double(V) % or Wanted = str2double(my_data_string) %...

Extracting numbers from array of cells

V = regexp(my_data_string,'\d+[\.]?\d*','match','once'); Wanted = str2double(V) % or Wanted = str2double(my_data_string) %...

8 days ago | 0

| accepted

Answered

Not enough input argumaents

https://in.mathworks.com/help/matlab/ref/function.html - I suggest you to read it for better understanding and further usage x ...

Not enough input argumaents

https://in.mathworks.com/help/matlab/ref/function.html - I suggest you to read it for better understanding and further usage x ...

8 days ago | 0

Answered

making sub arrays of first column depending on the second column number

Wanted = splitapply(@(x){x},a(:,1),findgroups(a(:,2))) % where a is your matrix celldisp(Wanted)

making sub arrays of first column depending on the second column number

Wanted = splitapply(@(x){x},a(:,1),findgroups(a(:,2))) % where a is your matrix celldisp(Wanted)

8 days ago | 1

| accepted

Answered

MATLAB Answers Wish-list #5 (and bug reports)

Whenever a text is edited by mobile [safari browser] , the click produces superfluous three letters " ltr " , which is really fr...

MATLAB Answers Wish-list #5 (and bug reports)

Whenever a text is edited by mobile [safari browser] , the click produces superfluous three letters " ltr " , which is really fr...

9 days ago | 0

Answered

Replacing an element in a matrix, then storing it as a different variable name

x2 = x; x2(x2==3) = 4

Replacing an element in a matrix, then storing it as a different variable name

x2 = x; x2(x2==3) = 4

10 days ago | 0

Answered

Comparing two matrix elements summing third and storing them separately

T = array2table(A); t = groupsummary(T,{'A1','A2'},'sum'); x = t{:,[1,2,end]}

Comparing two matrix elements summing third and storing them separately

T = array2table(A); t = groupsummary(T,{'A1','A2'},'sum'); x = t{:,[1,2,end]}

10 days ago | 0

Answered

How to stop matlab from truncating long decimal numbers

The decimals are not truncated it’s just the appearance in command window: doc format doc sprintf

How to stop matlab from truncating long decimal numbers

The decimals are not truncated it’s just the appearance in command window: doc format doc sprintf

10 days ago | 0

Answered

how can remove the rows and columns which has ones in all

use *all()* for columns and rows separately , make a copy of A to B and finally remove the unwanted

how can remove the rows and columns which has ones in all

use *all()* for columns and rows separately , make a copy of A to B and finally remove the unwanted

10 days ago | 0

| accepted

Answered

how to to address a specific cell

Use *find()* to know their indices: doc find

how to to address a specific cell

Use *find()* to know their indices: doc find

10 days ago | 0

Answered

How to replace numbers in a column vector after certain elements?

X(600+1 : end) = 0;

How to replace numbers in a column vector after certain elements?

X(600+1 : end) = 0;

10 days ago | 0

| accepted

Answered

Checking for conditions in Dataset

M = sort(matrix(:,specific_column)); top_5 = M(1:5); top_5_greater_than_50 = sum(top_5) > 50; There_exist = any(matri...

Checking for conditions in Dataset

M = sort(matrix(:,specific_column)); top_5 = M(1:5); top_5_greater_than_50 = sum(top_5) > 50; There_exist = any(matri...

11 days ago | 0

Answered

Saving data from loops

What values are you going to store? The chosen_index is for sure a scalar because as soon as the condition is satisfied once the...

Saving data from loops

What values are you going to store? The chosen_index is for sure a scalar because as soon as the condition is satisfied once the...

11 days ago | 0

Answered

remove Nan from a row vector using if statement only

*isnan()* would suffice your need doc isnan

remove Nan from a row vector using if statement only

*isnan()* would suffice your need doc isnan

11 days ago | 0

| accepted

Answered

Save data from while loop

You don’t need a loop , simply define t as t = 0:dt:100; doc while % to know more about the loop doc for and use element wi...

Save data from while loop

You don’t need a loop , simply define t as t = 0:dt:100; doc while % to know more about the loop doc for and use element wi...

12 days ago | 0

Answered

how to code variable to code

Completely terrible idea see https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-d...

how to code variable to code

Completely terrible idea see https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-d...

14 days ago | 0