How to divide 8 bit binary into two 4 bit?
A = '11001111' A = mat2cell(A, 1, [4, 4]); celldisp(A)

más de 1 año ago | 1

| accepted

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

más de 1 año ago | 0

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

más de 1 año ago | 0

| accepted

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

más de 1 año 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

más de 1 año ago | 1

| accepted

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

más de 1 año ago | 0

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

más de 1 año 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)

más de 1 año ago | 0

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

más de 1 año 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

más de 1 año 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...

más de 1 año 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)...

más de 1 año ago | 0

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

más de 1 año ago | 0

| accepted

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

más de 1 año ago | 1

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

más de 1 año ago | 0

| accepted

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

más de 1 año ago | 0

| accepted

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

más de 1 año ago | 1

| accepted

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

más de 1 año 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 >>

más de 1 año ago | 0

| accepted

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

más de 1 año ago | 0

draw a plot-graph
doc fimplicit3

más de 1 año ago | 1

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

más de 1 año ago | 0

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

más de 1 año ago | 0

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

más de 1 año 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...

más de 1 año 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 =...

más de 1 año 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

más de 1 año ago | 0

| accepted