Communication through MATLAB is always better than arguing.

Answered

как получить векторный массив выходных данных цикла for

n = 1 : 3; for k = 1 : numel(n) y(k) = 2*n(k); end

как получить векторный массив выходных данных цикла for

n = 1 : 3; for k = 1 : numel(n) y(k) = 2*n(k); end

13 hours ago | 0

Answered

First occurance problem in the adjacent coloumn

[~, ix1_2] = max(A == [ii, jj])

First occurance problem in the adjacent coloumn

[~, ix1_2] = max(A == [ii, jj])

13 hours ago | 0

Answered

display matrix row wise using fprintf have

matrix = [1:3; 4:6]; fprintf([repmat('%d ', 1, size(matrix, 2)) '\n'], matrix(1, :))

display matrix row wise using fprintf have

matrix = [1:3; 4:6]; fprintf([repmat('%d ', 1, size(matrix, 2)) '\n'], matrix(1, :))

14 hours ago | 0

Answered

for文で出た結果を行列に出力

k = 0 : 3; A = zeros(size(k)); for l = 1 : numel(k) A(l) = k(l); end A Without loop: A = 0 : 3

for文で出た結果を行列に出力

k = 0 : 3; A = zeros(size(k)); for l = 1 : numel(k) A(l) = k(l); end A Without loop: A = 0 : 3

17 hours ago | 1

Answered

Can anybody help me?

Pprime = bsxfun(@times, P, reshape(lambda, 1, 1, [ ]) % for newer versions use .* directly

Can anybody help me?

Pprime = bsxfun(@times, P, reshape(lambda, 1, 1, [ ]) % for newer versions use .* directly

1 day ago | 0

Answered

turn addition and multiplication into a code

syms x y = 0.5*0.024*(x^2+(0.06+x)^2); I suggest you to do MATLAB On-ramp course.

turn addition and multiplication into a code

syms x y = 0.5*0.024*(x^2+(0.06+x)^2); I suggest you to do MATLAB On-ramp course.

1 day ago | 0

Answered

How can you make an input to a symbolic variable?

equation = {'x^2 + x'}; diff(str2sym(equation)) equation = {'x^2 + y'}; eq = str2sym(equation); syms(symvar(eq)) diff(str2s...

How can you make an input to a symbolic variable?

equation = {'x^2 + x'}; diff(str2sym(equation)) equation = {'x^2 + y'}; eq = str2sym(equation); syms(symvar(eq)) diff(str2s...

1 day ago | 0

| accepted

Question

Precision in writetable()

Is there a way to use writetable() to export using only 2 decimals? To be able to directly export it to an excel file.

3 days ago | 1 answer | 0

Answered

How to solve 3 functions in 4 variables

Use solve() to get the answer what you show

How to solve 3 functions in 4 variables

Use solve() to get the answer what you show

5 days ago | 0

Answered

How to divide 8 bit binary into two 4 bit?

A = '11001111' A = mat2cell(A, 1, [4, 4]); celldisp(A)

How to divide 8 bit binary into two 4 bit?

A = '11001111' A = mat2cell(A, 1, [4, 4]); celldisp(A)

5 days ago | 0

| accepted

Answered

Error in plotting (blank graph): Vector Size

No loops needed: eta = -0.001778 * v.^2 + 0.05333 * v; eta(30 : end) = 0;

Error in plotting (blank graph): Vector Size

No loops needed: eta = -0.001778 * v.^2 + 0.05333 * v; eta(30 : end) = 0;

6 days 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; %...

Trying to input multiple vectors into function

stagpres1 = stagpres(1:10, 1:10) function stagpres1 = stagpres(deltaP, flowarea) gmpercm2 = deltaP * 0.010197; %...

6 days ago | 0

| accepted

Answered

Need help with 3-D plotting

[X, Y] = meshgrid(-2*pi : 0.01 : 2*pi);

Need help with 3-D plotting

[X, Y] = meshgrid(-2*pi : 0.01 : 2*pi);

6 days 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

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

6 days 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));

Evaluate function over a mesh grid (without for loops)

v = num2cell([X(:), Y(:)], 2); Z = reshape(cellfun(Jfun, v), size(X));

7 days ago | 0

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)

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)

8 days ago | 0

Answered

Multiplication of 1D and 2D vector to a 3D vector

C = repelem(B, 1, 1, max(A))

Multiplication of 1D and 2D vector to a 3D vector

C = repelem(B, 1, 1, max(A))

8 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

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

8 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...

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...

8 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)...

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)...

8 days ago | 0

Answered

Integrate an acceleration vector to obtain a velocity vector

Use cumtrapz() doc cumtrapz

Integrate an acceleration vector to obtain a velocity vector

Use cumtrapz() doc cumtrapz

8 days ago | 0

| accepted

Answered

Imaginary Number Notation/ Formatting Real and Complex Results

The imaginary part might not be exactly zero. vpa(Answer)

Imaginary Number Notation/ Formatting Real and Complex Results

The imaginary part might not be exactly zero. vpa(Answer)

10 days ago | 1

Answered

Find equal value in two cell arrays

Wanted = find(cellfun(@isequal, A, B))

Find equal value in two cell arrays

Wanted = find(cellfun(@isequal, A, B))

10 days ago | 0

| accepted

Answered

Beginning matlab user error, functions

Take that fminsearch() outside of the function doc function % see how to use functions

Beginning matlab user error, functions

Take that fminsearch() outside of the function doc function % see how to use functions

10 days ago | 0

| accepted

Answered

sin() - Subscript indices must either be real positive integers or logicals.

clear sin % since it's a variable

sin() - Subscript indices must either be real positive integers or logicals.

clear sin % since it's a variable

10 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 >>

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 >>

10 days ago | 0