Community Profile

photo

madhan ravi


2.915 total contributions since 2018

Communication through MATLAB is always better than arguing.

madhan ravi's Badges

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

View details...

Contributions in
View by

Answered
Error while integrating a piecewise constant function
integral(A1,0,1,'ArrayValued',1)

ongeveer 5 uur ago | 1

Answered
Reading data from cell array
C = cell2mat(cellfun(@(x) x(1,:), A, 'un',0)); save mymat.mat C

ongeveer 13 uur ago | 0

| accepted

Answered
Symbolic vectors 'invalid variable name'
sym('a',[1 4]) doc sym

ongeveer 15 uur ago | 0

| accepted

Answered
What is the meaning of '+-' and 'o-'
<https://in.mathworks.com/help/matlab/ref/linespec.html>

ongeveer 18 uur ago | 0

| accepted

Answered
Getting syntax error when using for loop.
r = linspace... % also consider preallocating x0

1 dag ago | 0

| accepted

Answered
how can i turn the results from a column into a row
x = zeros(1,5); % for illustration purposes for k = 1:5 x(k) = k; end

1 dag ago | 0

Answered
Int gives wrong(?) answer
int(x,0,1) => x^2/2 as Limits 1^2/2-0/2 => 1/2 % I don‘t see any mistakes ??

2 dagen ago | 0

Answered
Colon operator for cells
idx="Name"+(3:8); Tab1(ismember(Tab1{:,1},idx),:)

2 dagen ago | 0

Answered
Indexing into a m x n array to find values using an array of row and column indices
Note: Your D seems to be wrong 0.34+0.5 == 0.84 not .54. According to the example what you posted A and B are not cell array if...

2 dagen ago | 0

Answered
Why is it wrong: e3=sym('sin(x)^2+cos(x)=0')
sym('') was replaced by str2sym('') in latest versions and you seem to be using 2018b version e3=str2sym('sin(x)^2+cos(x)=0') ...

2 dagen ago | 0

| accepted

Answered
expr2=collect(EXPR,'exp(-t)') Why is it wrong?
expr2=collect(EXPR,exp(-t)) % no single quotes around the second argument

2 dagen ago | 0

| accepted

Answered
Doing calculation across columns
D=zeros(500,5); D=matrix; D(:,5)=exp((-(matrix(:,2)-75)/2).^2)

3 dagen ago | 0

Answered
vectors must be the same length
Make the vectors the same length then exactly as the error message tells you! *2 is a scalar*, each component of your vector rep...

3 dagen ago | 0

| accepted

Answered
length of arrey in cell and remove 0
A(cell2mat(A)==0)={[]}; % assuming each cell is scalar B(cell2mat(B)==0)={[]}; C=cellfun(@(m,u) numel(m)+numel(u),A, B, ...

4 dagen ago | 0

| accepted

Answered
Converting user input char to an array
It‘s not *st2sum* it’s *str2num()*. Usually *str2double()* is preferred.

4 dagen ago | 0

Answered
For an nx3 matrix, filter out the rows with a maximum 3rd column when the first and second are the same
See if this does what you want: m=[ 0 0 0 1 1 2 1 1 3 1 1 5 2 1 6 3 3 2 3...

4 dagen ago | 0

Answered
how can i ask the user for 2*2 matrix
if size(matr,2)>2 disp('Has more than 2 Columns beware!') end

4 dagen ago | 0

Answered
i got this error
Same issue as your previous question. <https://in.mathworks.com/matlabcentral/answers/457478-i-received-this-error#answer_37143...

5 dagen ago | 0

Answered
i received this error
You have a file named *rank.m* which *shadows* the *in-built* function *rank()* , move it from the *path* or *rename* it to avoi...

5 dagen ago | 0

Answered
How to combine sections from Workspace into a new vector?
Yes ,simply use basic indexing: % 1) D = [A(1:500);B(1:500)] % example % 2) ith_row = 400; jth_row ...

5 dagen ago | 1

| accepted

Question


Why does exit throw an error?
Error using exit Some kind of I/O error occurred when accessing database /var/folders/1c/p7c0w2dd0275_20nq4yjp1g00000gn/...

5 dagen ago | 0 answers | 0

0

answers

Answered
I appreciate if anyone could help me with this problem
Hint: Use *sort()*.

6 dagen ago | 1

Answered
How does Matrix(3002:2001:1999998)=0.4 works?
Matrix = [1:3;4:6;7:9] Matrix(1:2:end) = 0 % I suggest you to read about MATLAB indexing

6 dagen ago | 0

Answered
How to run a for-loop multiple times?
for k=1:100 for ... % some operation end end

6 dagen ago | 0

Answered
Double integration within finite limits
Simply use *integral2()*

6 dagen ago | 0

Answered
How to create an Array of vectors ??
Use a cell array as Stephen suggests: v1=1:3; v2=2:9; v3=2; A={v1;v2;v3}

6 dagen ago | 0

Answered
How to add two different set values .
A={4,5,3}; B={12}; [A{:}]+[B{:}]

7 dagen ago | 0

Answered
Undefined function or variable 'imtile'. is ti belongs to any toolbox?
<https://in.mathworks.com/help/matlab/ref/imtile.html> - *released in 2018b*

7 dagen ago | 0

Answered
Input function does not display the command in command window
Looks like you have made a file named *input.m* remove it from the path or rename it.

7 dagen ago | 0

| accepted

Answered
Collecting the outputs of a function within a for loop
time = 100; [A,B,C,D]=deal(cell(100,1)); % if the outputs are scalars then use zeros() instead of cell for ii=1:time [A{i...

7 dagen ago | 0

Load more