Community Profile

photo

madhan ravi


Last seen: Today
4,494 total contributions since 2018

Communication through MATLAB is always better than arguing.

madhan ravi's Badges

  • Master
  • First Review
  • First Submission
  • Thankful Level 4
  • 12 Month Streak
  • Knowledgeable Level 4
  • Promoter
  • Commenter
  • Revival Level 3
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
Error in plotting (blank graph): Vector Size
No loops needed: eta = -0.001778 * v.^2 + 0.05333 * v; eta(30 : end) = 0;

24 hours ago | 0

Answered
Trying to input multiple vectors into function
stagpres1 = stagpres(1:10, 1:10) function stagpres1 = stagpres(deltaP, flowarea) gmpercm2 = deltaP * 0.010197; %...

24 hours ago | 0

| accepted

Answered
Need help with 3-D plotting
[X, Y] = meshgrid(-2*pi : 0.01 : 2*pi);

1 day ago | 0

| accepted

Answered
What is the problem with the code on the line that reads "disp({'Coordinates For Node ' num2str(k1) ' ^re: '})
{} -> [] , simply use sprintf() on that line

1 day ago | 0

| accepted

Answered
Evaluate function over a mesh grid (without for loops)
v = num2cell([X(:), Y(:)], 2); Z = reshape(cellfun(Jfun, v), size(X));

2 days ago | 0

Answered
plotting Table doesn't work anymore?
x = T{:, 1} y = T{:, 2}

2 days ago | 0

| accepted

Answered
Finding the index in two different arrays where values are closest
Note: Not tested. ix = abs(a(:) - b(:).'); [~, ID] = min(ix(:)); [where_a, where_b] = ind2sub(size(ix), id)

3 days ago | 0

Answered
Multiplication of 1D and 2D vector to a 3D vector
C = repelem(B, 1, 1, max(A))

3 days ago | 0

Answered
Multiplication of 1D and 2D vector to a 3D vector
[m, n] = size(B); C = zeros(m, n, numel(A)); for k = 1:numel(A) C(:, :, A(k)) = B; end C

3 days ago | 0

Answered
Multiplication of 1D and 2D vector to a 3D vector
Sigh. Your question says one thing and your example does another thing. Only God know what you want. C = repmat(B, 1, 1, max...

3 days ago | 0

Answered
Multiplication of 1D and 2D vector to a 3D vector
C = reshape(A, 1, 1, []) .* B % use bsxfun() if you’re version is prior to 2016b C = bsxfun(@times, reshape(A, 1, 1, []), B)...

3 days ago | 0

Answered
Integrate an acceleration vector to obtain a velocity vector
Use cumtrapz() doc cumtrapz

3 days ago | 0

| accepted

Answered
Imaginary Number Notation/ Formatting Real and Complex Results
The imaginary part might not be exactly zero. vpa(Answer)

5 days ago | 1

Answered
Find equal value in two cell arrays
Wanted = find(cellfun(@isequal, A, B))

5 days ago | 0

| accepted

Answered
Beginning matlab user error, functions
Take that fminsearch() outside of the function doc function % see how to use functions

5 days ago | 0

| accepted

Answered
row elimination problem.
A(all(A == 0, 2), :) = [ ]

5 days ago | 1

| accepted

Answered
sin() - Subscript indices must either be real positive integers or logicals.
clear sin % since it's a variable

5 days ago | 1

| accepted

Answered
How do I simplify the values of a function?
>> a a = 2 >> b b = 4 >> syms x f(x) = a*b + b*x f(x) = 4*x + 8 >>

5 days ago | 0

Answered
2 Scenario Legend Setup
plot(1:5, '-k') hold on plot(6:10, ':y') legend({'Leg 1', 'Leg2'}) %?

6 days ago | 0

Answered
draw a plot-graph
doc fimplicit3

6 days ago | 1

Answered
How to write delta in matlab?
<https://www.mathworks.com/help/symbolic/sym.dirac.html>

8 days ago | 0

Answered
I want to split a char array '1001' into 1 0 0 1 bits
'1001' - '0'

9 days ago | 0

Answered
Differential equations using ODE45
doc ode45 % have a read at the document

9 days ago | 0

Answered
How to get == to help solving equations
You should have the Symbolic Math Toolbox and the license for it to perform the above operation. In order to replicate your mess...

9 days ago | 0

Answered
How to use blkdiag in 3D matrix
A slight variation: M = cell(size(B, 3), 1); for k = 1 : size(A, 3) M{k} = blkdiag(A(:, : , k), B(:, :, k)); end M =...

9 days ago | 0

Answered
How do I add color to text output to the Command Window?
https://www.mathworks.com/matlabcentral/fileexchange/24093-cprintf-display-formatted-colored-text-in-the-command-wind

9 days ago | 0

Answered
Need help inputting my equation into MATLAB
In line f, M(t) causes the error perhaps you mean‘t M*t ?

10 days ago | 0

Answered
How to store value of for loop in a array
for z = linspace(0, 0.03, 31) By the way you don’t need a Loop it’s simply: A = 1 ./ (1 + ((z / aes) .^ 2))

10 days ago | 0

Answered
solve first-order ODE
ode = @(t, Y) sin( exp(Y - t/2) - t^2/2 ) ode45(ode, [0 2*pi], 0)

10 days ago | 0

Load more