Community Profile

photo

madhan ravi


3.039 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
How do I write matrix function with symbolic expression
Since it’s your homework: <https://in.mathworks.com/help/symbolic/solve.html#bup_5dp-1>

etwa 10 Stunden ago | 0

Answered
Find overlap between 2 arrays?
intersect(A,B)

etwa 19 Stunden ago | 0

Answered
MATLAB Answers Wish-list #4 (and bug reports)
Sometimes deleting answer after moving is impossible for instance the below thread: https://in.mathworks.com/matlabcentral/answ...

etwa 20 Stunden ago | 0

Answered
How to find a double integral
[m,n,p]=deal(1); % example values syms theta phi f=m*p*cos(theta)^3*sin(phi)^2 - ... n*p*cos(phi)^2*cos(theta)^3 - ... ...

ein Tag ago | 0

Answered
why is my code not working?
Probably you want (no loops needed): ii = linspace(0.0001,0.0009,1000); Fm = (0.25).*(((log((2.7*10^-5)+... (2.51.*((Rey....

ein Tag ago | 1

Answered
Hi , i have a matrix and need to extract the column in this way , thank you
idx= [ 1 5 9 13 ]; A(:,idx) % 4 X 4 A(:,setdiff(1:size(A,2),idx)) % 4 X 12

ein Tag ago | 0

| accepted

Answered
Having trouble to solve equations
Use fsolve(): E=1.42; F=@(x)[((E+x(1))*0.1+(-x(2)-7*x(3))*(((E+x(1))*(E+x(1))*(E+x(1))*(E+x(1)))/(((E+x(1))*(E+x(1))*(E+x(1))...

ein Tag ago | 1

Answered
i am not getting correct output.please help
e = eccentricity(1,2) % function call function e = eccentricity(a,b) % function definition , a & b assumed as scalars for thi...

ein Tag ago | 0

Answered
Why am I not getting the plot results?
Because you missed the dot operators: https://in.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html The bel...

2 Tage ago | 0

Answered
sorted two different arrays
[~,idx]=sort(T{:,1}); % T your table C(idx,:) % C your cell become sorted according to first column of table T(idx,:) ...

2 Tage ago | 1

| accepted

Answered
is there such a matrix operator
sum(X .* Y)

2 Tage ago | 1

| accepted

Answered
Adding Zeroes to a Vector
vector = [vector,zeros(1,102)]

2 Tage ago | 0

| accepted

Answered
Sum specific colums based on a criteria
sum(R(:,any(R>=.2)))

3 Tage ago | 0

| accepted

Answered
Am getting the error ' Array indices must be positive integers or logical values.
xander = 1/n * h1 * (sum(kiki * (([m{:}] - numel(Test)/h1)))); % ^ missed

3 Tage ago | 0

| accepted

Answered
Is the following sample mean and variance fully vectorised?
MATLAB already has inbuilt functions named <https://in.mathworks.com/help/matlab/ref/mean.html *mean()*> and <https://in.mathwor...

3 Tage ago | 0

Answered
compare two matrix one by one number to eachother
% a = > first matrix % b = > second matrix sum(a==b) % each column -> tells the number of counts of each matrix's column compa...

3 Tage ago | 0

| accepted

Answered
How to insert a new vector to matrix in every iteration?
Trivially done without a loop: out = [repelem(x,1:numel(x));repmat(y,1,numel(x))] With loop: x=1:3; y=4:5; ctr=1; out=zer...

3 Tage ago | 1

| accepted

Answered
Swap first and last word in a string
Simpler: s = 'hello world'; Wanted = swap(s) % function call % function function Wanted = swap(str) S = regexp(str,'\S*'...

3 Tage ago | 0

Answered
How to read multiple .txt file in MATLAB ?
Files = dir('*.txt'); n = numel(Files); MAX = zeros(n,1); for k = 1:n MAX(k) = mean(reshape(load(Files(k)....

3 Tage ago | 0

Answered
extract column name of table with Nan column
patients.Properties.VariableNames(all(isnan(patients{:,:})))

3 Tage ago | 0

| accepted

Answered
logarithmic equation with ln
b = 0.174 * log( 59.6 * rf ./rs )

3 Tage ago | 0

| accepted

Answered
I don't know how to plot what answer of dsolve
syms y(x) Dy = diff(y); D2y = diff(y,2); k=3; % example f = dsolve(D2y==-(exp(-k^2))*y,y(0)==1,Dy(1)==0); fplot(f);

3 Tage ago | 0

Answered
Convert Cell to variable name array
A={'sample1' 'sample2' 'sample3'} ; a = array2table(rand(3)); % an example a.Properties.VariableNames=A

3 Tage ago | 0

| accepted

Answered
Problem with university's licence
Contact your university's IT department.

3 Tage ago | 1

Answered
Ode45 iteration issue
[t1,X2]=deal(cell(numel(C1),1)); for k = 1:numel(C1) [t1{k},X2{k}] = ode45(@(t,x)fun(t,x,C1(k),C2(k),C3(k),C4(k)),t0,X01);...

3 Tage ago | 0

| accepted

Answered
zero for input argument
zeros not zero

4 Tage ago | 0

| accepted

Answered
How to insert an unknown number of coloumn in a Matrix?
Try this: B=rand(3); % your initial matrix [m,n]=size(B); No_of_Columns=input('No of columns to be inserted') disp...

4 Tage ago | 0

| accepted

Answered
How can I set a matrix value to equal a non-numeric coordinate?
[a,b]=find(x==3)% I don't see the point of this if your assigning the same value x==3 % is already sufficient and efficient for...

4 Tage ago | 0

Answered
how to use two y axis in plot?
doc plotyy

4 Tage ago | 0

Answered
accumulate in multiple array
splitapply(@(x) mean(x,2),Temp,findgroups(Day))

4 Tage ago | 1

| accepted

Load more