Communication through MATLAB is always better than arguing.

Answered

How to extract before and after a character up to a certain limit?

Before = regexp(str, '(?<=\z)(?:.*)(?=\c)', 'match', 'once') After = regexp(str, '(?<=\c)(?:.*)(?=\z)', 'match', 'once')

How to extract before and after a character up to a certain limit?

Before = regexp(str, '(?<=\z)(?:.*)(?=\c)', 'match', 'once') After = regexp(str, '(?<=\c)(?:.*)(?=\z)', 'match', 'once')

8 hours ago | 0

| accepted

Answered

Trying to figure out how to get the correct answer with an anonymous function

LC < D sqrt(of a negative number) gives complex value

Trying to figure out how to get the correct answer with an anonymous function

LC < D sqrt(of a negative number) gives complex value

1 day ago | 0

| accepted

Question

Can't get past Task 2

I'm trying out Image Processing Onramp, why can't i get past through 2.2 Grayscale and Color Images: (2/3) Extract Color Planes...

1 day ago | 0 answers | 0

Answered

Print certain values from an array with a condition

ix = find(y == min(y)); fprintf('min value of y = %d\n', y(ix)) fprintf('x value for min y = %d\n', x(ix))

Print certain values from an array with a condition

ix = find(y == min(y)); fprintf('min value of y = %d\n', y(ix)) fprintf('x value for min y = %d\n', x(ix))

1 day ago | 0

| accepted

Answered

Finding the poles in Transfer Function

s = tf('s'); G = 1 / (s * (s + 2) * (s + 4)); pole(G)

Finding the poles in Transfer Function

s = tf('s'); G = 1 / (s * (s + 2) * (s + 4)); pole(G)

1 day ago | 0

| accepted

Answered

Extracting specific rows with different content from a large table array

ix = find(TaBle.MatDate == 736958); Wanted = TaBle{(ix-30):(ix+10), :}

Extracting specific rows with different content from a large table array

ix = find(TaBle.MatDate == 736958); Wanted = TaBle{(ix-30):(ix+10), :}

1 day ago | 1

Answered

Specify specific cell in the formula

ix = TaBle.Age == 77; A = TaBle.Age{ix, :} * TaBle.discount_px{ix, :}

Specify specific cell in the formula

ix = TaBle.Age == 77; A = TaBle.Age{ix, :} * TaBle.discount_px{ix, :}

1 day ago | 0

Answered

How to arrange the values of the matrix according to index number?

C_new = zeros(numel(A), numel([A, B])); C_new(:, A) = A1; C_new(:, B) = B1.'

How to arrange the values of the matrix according to index number?

C_new = zeros(numel(A), numel([A, B])); C_new(:, A) = A1; C_new(:, B) = B1.'

1 day ago | 0

| accepted

Answered

How to get a contour plot from the combination of "for loop" and "matrix operation"?

[X, Y] = meshgrid(x, y); Z = X .* Y; contourf(X, Y, Z)

How to get a contour plot from the combination of "for loop" and "matrix operation"?

[X, Y] = meshgrid(x, y); Z = X .* Y; contourf(X, Y, Z)

1 day ago | 0

Answered

The voltage across a discharging capacitor is v(t)=10(1−e−0.2t ) Generate a table of voltage, v(t) , versus time, t, for t = 0 to 50 seconds with increment of 5 s.

doc colon doc fprintf doc array2table

The voltage across a discharging capacitor is v(t)=10(1−e−0.2t ) Generate a table of voltage, v(t) , versus time, t, for t = 0 to 50 seconds with increment of 5 s.

doc colon doc fprintf doc array2table

1 day ago | 0

Answered

How to use a list of indices to extract elements without for loop?

No, you cannot. The alternaternative is to use arrayfun() and co, but it just has an implicit loop. So I would say a loop is muc...

How to use a list of indices to extract elements without for loop?

No, you cannot. The alternaternative is to use arrayfun() and co, but it just has an implicit loop. So I would say a loop is muc...

1 day ago | 0

| accepted

Answered

How do I fix this ?

function total_volume = A09_poolSubfunction_erastogi(surface_r, bottom_r, depth_shallow, depth_deep)

How do I fix this ?

function total_volume = A09_poolSubfunction_erastogi(surface_r, bottom_r, depth_shallow, depth_deep)

2 days ago | 0

Answered

How to create another line of code

It’s because you’re typing it in the COMMAND WINDOW. Use a script/live script.

How to create another line of code

It’s because you’re typing it in the COMMAND WINDOW. Use a script/live script.

2 days ago | 0

Answered

How to plot all data points on one graph

R = [0.8 0.85 0.9 0.95 0.99]; y = 1 : numel(R); high = 1-((1-R.^y).^2); plot(R, y) % follow the same for low

How to plot all data points on one graph

R = [0.8 0.85 0.9 0.95 0.99]; y = 1 : numel(R); high = 1-((1-R.^y).^2); plot(R, y) % follow the same for low

2 days ago | 0

| accepted

Answered

Creating functions with certain inputs but no outputs

doc * doc + doc - doc / doc function

Creating functions with certain inputs but no outputs

doc * doc + doc - doc / doc function

2 days ago | 0

Answered

How can I show axis ticks as fractions?

yticklabels("1/" + (150 : -25 : 50)) % or yticklabels(compose("1/%d", (150 : -25 : 50)) % or set(gca, 'YTickLabel', sprintfc...

How can I show axis ticks as fractions?

yticklabels("1/" + (150 : -25 : 50)) % or yticklabels(compose("1/%d", (150 : -25 : 50)) % or set(gca, 'YTickLabel', sprintfc...

3 days ago | 0

| accepted

Answered

How to convert an expression to a function with lossless precision?

vpa(f_func(sym(sol1), sym(sol2)))

How to convert an expression to a function with lossless precision?

vpa(f_func(sym(sol1), sym(sol2)))

3 days ago | 0

Answered

Help with storing values for the loop I created want to store them with where they are located on the vector

Google bubblesort.

Help with storing values for the loop I created want to store them with where they are located on the vector

Google bubblesort.

3 days ago | 0

Answered

Help... what is my mistake and what should i do now?? please

Since you have shown efforts: too_young = under_age(2, []) % [] means no limit was given function too_young = under_age(...

Help... what is my mistake and what should i do now?? please

Since you have shown efforts: too_young = under_age(2, []) % [] means no limit was given function too_young = under_age(...

4 days ago | 0

| accepted

Answered

perform matrix operation without for loop

xe = exp(reshape(beta, 1, 1, []) .* exp_data) .* (exp_data > 1.5) + 1 * (exp_data <= 1.5); % use bsxfun() for implicit expansio...

perform matrix operation without for loop

xe = exp(reshape(beta, 1, 1, []) .* exp_data) .* (exp_data > 1.5) + 1 * (exp_data <= 1.5); % use bsxfun() for implicit expansio...

4 days ago | 0

Answered

after how many terms does an equation have the same five decimals as pi/4?

if abs(p - pi/4) < 1e-5 Look through the tag floating-point to know why tolerance is used to compare decimals.

after how many terms does an equation have the same five decimals as pi/4?

if abs(p - pi/4) < 1e-5 Look through the tag floating-point to know why tolerance is used to compare decimals.

4 days ago | 0

| accepted

Question

Viewing figure is not possible.

Why can't I view the figure? P.S: The following is just to familiarise with Python in MATLAB environment. System: MacOs. >> p...

5 days ago | 1 answer | 0

Answered

Cell array variable problem

Structure_Global_Stiffness{kk,zz}(~eye(3)) = 0;

Cell array variable problem

Structure_Global_Stiffness{kk,zz}(~eye(3)) = 0;

5 days ago | 0

| accepted

Answered

Error: The input character is not valid in MATLAB statements or expressions.

Change " to '

Error: The input character is not valid in MATLAB statements or expressions.

Change " to '

5 days ago | 1