Answered

How to count the number of letter case changes in a string array

c = 'hfeHDdheD'; nnz(diff(ismember(c, 'A':'Z')))

How to count the number of letter case changes in a string array

c = 'hfeHDdheD'; nnz(diff(ismember(c, 'A':'Z')))

2 years ago | 1

Answered

How to get the time when a variabile reaches the maximum value?

doc max

How to get the time when a variabile reaches the maximum value?

doc max

2 years ago | 0

| accepted

Answered

Counting the Size of X Indices of a Matrix

Naming variables is a bad idea Dimensions = num2cell(size(rand(2,3,4))) % simply use a cell array celldisp(Dimensions)

Counting the Size of X Indices of a Matrix

Naming variables is a bad idea Dimensions = num2cell(size(rand(2,3,4))) % simply use a cell array celldisp(Dimensions)

2 years ago | 0

| accepted

Answered

I'm getting a confusing error message.

Remove first two lines. Name of the file and function should be the same. help function

I'm getting a confusing error message.

Remove first two lines. Name of the file and function should be the same. help function

2 years ago | 0

Answered

Given an array of co-ordinates, for each value of x, how do I extract the smallest value of y?

x = [1; 1; 1; 2; 2; 3; 3; 3]; y = [1; 2; 3; 3; 2; 1; 2; 3]; T = array2table([x, y], 'VariableNames', {'x', 'y'}); T1 = groups...

Given an array of co-ordinates, for each value of x, how do I extract the smallest value of y?

x = [1; 1; 1; 2; 2; 3; 3; 3]; y = [1; 2; 3; 3; 2; 1; 2; 3]; T = array2table([x, y], 'VariableNames', {'x', 'y'}); T1 = groups...

2 years ago | 1

Answered

How to remove zeroes not defined by indices

Wanted = zeros(numel(nonzeros(A)) + numel(B), 1); Wanted(setdiff(1 : numel(Wanted), B)) = nonzeros(A)

How to remove zeroes not defined by indices

Wanted = zeros(numel(nonzeros(A)) + numel(B), 1); Wanted(setdiff(1 : numel(Wanted), B)) = nonzeros(A)

2 years ago | 0

| accepted

Answered

Multiplying sine wave with step function

uu = @(nn) +(nn >= 0); xxuu = xx .* uu(t)

Multiplying sine wave with step function

uu = @(nn) +(nn >= 0); xxuu = xx .* uu(t)

2 years ago | 1

Answered

I'm getting Not enough input arguments

Your last line should be before the function

I'm getting Not enough input arguments

Your last line should be before the function

2 years ago | 0

Answered

How can I remove negative values from vector (Half-Wave Rectification)

vector = [1, -1]; vector( vector < 0 ) = 0 % [] to remove

How can I remove negative values from vector (Half-Wave Rectification)

vector = [1, -1]; vector( vector < 0 ) = 0 % [] to remove

2 years ago | 0

Answered

x(t) = 2 cos(200πt + 10o )

<https://www.mathworks.com/help/signal/gs/waveform-generation-time-vectors-and-sinusoids-1.html>

x(t) = 2 cos(200πt + 10o )

<https://www.mathworks.com/help/signal/gs/waveform-generation-time-vectors-and-sinusoids-1.html>

2 years ago | 0

Answered

Find row elements of a table in another table

help ismember % 'row' option

Find row elements of a table in another table

help ismember % 'row' option

2 years ago | 1

| accepted

Answered

Replacing all values of a with b in a matrix?

What do you expect == is a logical operator, when not used in symbolic calculations if you just want to assign it, then simply u...

Replacing all values of a with b in a matrix?

What do you expect == is a logical operator, when not used in symbolic calculations if you just want to assign it, then simply u...

2 years ago | 0

| accepted

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

2 years ago | 0

| accepted

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

2 years 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, :))

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

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

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

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

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

2 years ago | 2 answers | 4