Community Profile

photo

madhan ravi


2.526 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
sym/double error(line 665)
P.S: There is a warning at the end but yields a result without error G = matlabFunction(sqrt(1 + g_x + g_y)); % read about matl...

ongeveer 3 uur ago | 0

Answered
indexing an entire for loop
No loops needed: T = x.^2.' + 2*y.^2

ongeveer 7 uur ago | 0

Answered
indexing an entire for loop
x = -3:0.1:3; y = -1:0.1:1; ii = length(x); jj = length(y); T = zeros(ii,jj); for k = 1:ii for l = 1:jj T(k,l...

ongeveer 8 uur ago | 0

| accepted

Answered
What is wrong with this code?
Remove the single quotes from the last line, upload the code instead of a picture. a/rw^2 == (cos(x)+(n^2*cos(2*x)+sin(x)^4))/(...

ongeveer 9 uur ago | 0

Answered
Distance between all elements of row vector
Straightforward: row.'-row

ongeveer 10 uur ago | 0

Answered
Calculating mean over multiple dimensions
mean(data,'all') % or mean(data,[3 2 1])

1 dag ago | 0

Answered
Plot multiple data in one plot using for loop
If you look the data in each cell closely infact they are all the same so all the plots overlap each other: plot(x,[y{:}]) % yo...

1 dag ago | 0

| accepted

Answered
write statement without using for loop
gi=Alpha.*(bi==0)+Beta.*(bi==1)

1 dag ago | 1

| accepted

Answered
For loop averaging increments
Since it’s homework take mean along the first dimension: doc mean

1 dag ago | 0

Answered
How can I subs 2 symbolic vectors in 1 comand?
Edit: Corrected the mistake. A workaround: Z=matlabFunction([X,Y]); % change this line XY=num2cell([X0,Y0]); Z(XY{:}) % eval...

2 dagen ago | 0

Answered
How can I type inverse sign in axis labels? like 1/CL
xlabel('$\frac{1}{CL}$','Interpreter','latex')

2 dagen ago | 0

Answered
How can I get outcome at a particular value after performing differentiation?
Another option: dx(x)=diff(f); dx(3)

2 dagen ago | 0

Answered
change appearance of formula
vpa(Total)

3 dagen ago | 0

| accepted

Answered
How to Show 1/4 in 1/2^2?
I can only think of printing it using fprintf(): fprintf('1/%d^2 ',x)

3 dagen ago | 1

Answered
Find the row number of element that meets the condition
index=find(A>500,1,'first') B(index)

3 dagen ago | 1

| accepted

Answered
read csv file in sequence and post process data
Use cell arrays instead of numbering variables ( https://www.mathworks.com/matlabcentral/answers/105936-how-to-make-dynamic-vari...

3 dagen ago | 1

| accepted

Answered
How to find rearrange these values in a new row and column?
newmatrix = matrix([2 4 5 8],:)

4 dagen ago | 0

Answered
Why does my index exceed array bounds for the following for loop?
You don’t need a loop mewp* % ^-—-—-missed it

4 dagen ago | 0

Answered
divide data according to year, month, day
https://www.mathworks.com/help/matlab/ref/datetime.ymd.html

4 dagen ago | 0

Answered
negative number in vector
c=v(1:find(v<0,1,'first')-1)

4 dagen ago | 1

| accepted

Answered
How to read only 1 value in row 2, column 1 ?
M = dlmread('csvlist.dat',',',[0,1,0,1])

4 dagen ago | 0

Answered
How to find first non repeated (unique) character in a string?
u=unique(s,'stable'); % where s is your input Z=arrayfun(@(x)nnz(s==u(x)),1:numel(u)); Result=u(find(Z==1,1,'first'))

4 dagen ago | 1

| accepted

Answered
Merge two matrices taking non-Null values
C=zeros(size(A)); C(:,~all(isnan(A)))=A(:,~all(isnan(A))); C(:,~all(isnan(B)))=B(:,~all(isnan(B)));

4 dagen ago | 0

| accepted

Answered
How to remove numbers between specific symbols in text array?
a="Gas_1_O2"; regexprep(a,'\_\d*.?\d*\_','_')

4 dagen ago | 0

| accepted

Answered
Problem in running my code
Don't name variable max because there is an inbuilt function named max(), preallocate Rhn for speed and efficiency: TN=4; n_ve...

4 dagen ago | 0

Answered
dsolve problem not showing result
syms y(x) eqn = diff(y) == y/x; vars = y(x); V = odeToVectorField(eqn) M = matlabFunction(V,'vars', {'x','Y'}) interval = [...

4 dagen ago | 1

| accepted

Answered
I am getting an error like function definitions are not permitted in this context in matlab R2014b
P.s - I am not going to look into your code. I am just answering your main question. https://www.mathworks.com/help/matlab/ref/...

4 dagen ago | 0

Answered
Can't get fprintf to display my equations answer
%.2f ^-—-—missed it

5 dagen ago | 0

| accepted

Answered
Problem when importing a TXT file into MATLAB with "readtable". Text and numbers are between single quotes...
T=table2cell(data); T(:,3:end)=cellfun(@str2double,T(:,3:end),'un',0)

5 dagen ago | 0

Load more