Community Profile

##### Last seen: Today
4,494 total contributions since 2018

Communication through MATLAB is always better than arguing.

View details...

Contributions in
View by

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

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

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

1 day ago | 0

| accepted

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

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

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

2 days ago | 0

| accepted

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

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

3 days ago | 0

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

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

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

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

3 days ago | 0

| accepted

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

5 days ago | 1

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

5 days ago | 0

| accepted

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

5 days ago | 0

| accepted

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

5 days ago | 1

| accepted

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

5 days ago | 1

| accepted

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

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

6 days ago | 0

draw a plot-graph
doc fimplicit3

6 days ago | 1

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

8 days ago | 0

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

9 days ago | 0

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

9 days ago | 0

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

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

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

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