Answered

Plotting multiple probability distribution plots in succession

Something like this M = rand(24, 200); % your matrix figure; for i=1:size(M,1) x = M(i, :); subplot(6, 4, i); ...

Plotting multiple probability distribution plots in succession

Something like this M = rand(24, 200); % your matrix figure; for i=1:size(M,1) x = M(i, :); subplot(6, 4, i); ...

2 días ago | 0

| accepted

Answered

Subs function does not work on symbolic expressions and functions

You are overwriting the symbolic variable 'm' with numeric value on line m = solve(norm([5/m, 3/m, 0]) == 4.32, m); and after...

Subs function does not work on symbolic expressions and functions

You are overwriting the symbolic variable 'm' with numeric value on line m = solve(norm([5/m, 3/m, 0]) == 4.32, m); and after...

2 días ago | 0

Answered

Removing DC component at 0 HZ from acceleration data after fft

As described here: http://blog.originlab.com/how-to-remove-dc-offset-before-performing-fft try using a high-pass filter to remov...

Removing DC component at 0 HZ from acceleration data after fft

As described here: http://blog.originlab.com/how-to-remove-dc-offset-before-performing-fft try using a high-pass filter to remov...

2 días ago | 0

| accepted

Answered

How to capitalize words in a string (matlab)

"strrep() function is banned here". What about regexprep in = 'Hello Mello Jello Mello Hello'; out = regexprep(in, {'hello', '...

How to capitalize words in a string (matlab)

"strrep() function is banned here". What about regexprep in = 'Hello Mello Jello Mello Hello'; out = regexprep(in, {'hello', '...

2 días ago | 0

Answered

How to plot with diferents colors

By default, the MATLAB axes only use seven colors to plot the lines. After that, the sequence is repeated if there are more then...

How to plot with diferents colors

By default, the MATLAB axes only use seven colors to plot the lines. After that, the sequence is repeated if there are more then...

2 días ago | 0

Answered

Giving names to cells

Use iscell() function if ~iscell(output{i}) Also, note that save() will not accept indexing like this 'output{i}'. You will ne...

Giving names to cells

Use iscell() function if ~iscell(output{i}) Also, note that save() will not accept indexing like this 'output{i}'. You will ne...

2 días ago | 0

| accepted

Answered

Timeseries Plot Between a certain time interval

See the attached file (saved in R2020a) for one of the possible ways. It uses the MATLAB function block.

Timeseries Plot Between a certain time interval

See the attached file (saved in R2020a) for one of the possible ways. It uses the MATLAB function block.

2 días ago | 0

Answered

resistor with random variable number not working

There is no need to add randn(1) in the resistor value. As the documentation page mentions: https://www.mathworks.com/help/simrf...

resistor with random variable number not working

There is no need to add randn(1) in the resistor value. As the documentation page mentions: https://www.mathworks.com/help/simrf...

2 días ago | 0

Answered

Problems in solve iteratively calculation

If you look at the graph of this equation, you can see that it has two solutions in the interval [0 1]. syms dt2; f = (-2.4638...

Problems in solve iteratively calculation

If you look at the graph of this equation, you can see that it has two solutions in the interval [0 1]. syms dt2; f = (-2.4638...

2 días ago | 0

| accepted

Answered

Importing a text or spreadsheet file to be used as a uitable.

Calling uitable() inside the function will tell MATLAB to create a new uitable. I suggest you to first add a UITable in the app ...

Importing a text or spreadsheet file to be used as a uitable.

Calling uitable() inside the function will tell MATLAB to create a new uitable. I suggest you to first add a UITable in the app ...

2 días ago | 0

Answered

exportgraphics r2020a issue

I didn't face this problem in R2020a update 2, however, I remember observing something like this (not exactly sure if it was exp...

exportgraphics r2020a issue

I didn't face this problem in R2020a update 2, however, I remember observing something like this (not exactly sure if it was exp...

3 días ago | 0

Answered

Choose numerical type for table2array output

Seomthing like this T=table; T.var1=ones(10,1,'uint8'); T.var2=1000*ones(10,1,'double'); array = structfun(@double, table2st...

Choose numerical type for table2array output

Seomthing like this T=table; T.var1=ones(10,1,'uint8'); T.var2=1000*ones(10,1,'double'); array = structfun(@double, table2st...

3 días ago | 0

Answered

regexp: \w* vs \w+

\w does not match spaces. \s is used to match spaces. \w only matches a-z A-Z 0-9 and underscore. Following attempts to show the...

regexp: \w* vs \w+

\w does not match spaces. \s is used to match spaces. \w only matches a-z A-Z 0-9 and underscore. Following attempts to show the...

3 días ago | 0

| accepted

Answered

Slow computation speed using piecewise functions

Functions such as triangularPulse and piecewise are from the symbolic toolbox, and they can be very slow as compare to floating-...

Slow computation speed using piecewise functions

Functions such as triangularPulse and piecewise are from the symbolic toolbox, and they can be very slow as compare to floating-...

3 días ago | 0

| accepted

Answered

Maximum recursion limit error

ode45 should be called outside the ODE function. Your actual ode function is this function dv=Question3(t,v) % dv/dt=8-4 dv=4...

Maximum recursion limit error

ode45 should be called outside the ODE function. Your actual ode function is this function dv=Question3(t,v) % dv/dt=8-4 dv=4...

3 días ago | 1

| accepted

Answered

Input system nonlinear (Identification)

You can use randn() u = randn(1, 1000);

Input system nonlinear (Identification)

You can use randn() u = randn(1, 1000);

3 días ago | 0

| accepted

Answered

Problem relating to mathematical expression

Try this x = [0.1, 0.2, 0.4, 0.5, 0.4, 0.6, 0.6, 0.6, 0.2, 0.3]; n = numel(x); k = 5; if round(n/k)==n/k split = mat2ce...

Problem relating to mathematical expression

Try this x = [0.1, 0.2, 0.4, 0.5, 0.4, 0.6, 0.6, 0.6, 0.2, 0.3]; n = numel(x); k = 5; if round(n/k)==n/k split = mat2ce...

3 días ago | 0

Answered

How to modify decimal places when exporting data with fprintf

Try this code a = {'C1', 'A1', 'B1'}' b = {'C', 'A', 'B'}' c = {1.1, 2.1, 3.1}' d = {1.16666, 2.16666, 3.16666}' e = {'C', ...

How to modify decimal places when exporting data with fprintf

Try this code a = {'C1', 'A1', 'B1'}' b = {'C', 'A', 'B'}' c = {1.1, 2.1, 3.1}' d = {1.16666, 2.16666, 3.16666}' e = {'C', ...

3 días ago | 2

| accepted

Answered

Nernst Equation plotting in MATLAB

Try this code, I changed the range of T1 and used element-wise operator in the equation for Eout1 %Constant Temperature and Cha...

Nernst Equation plotting in MATLAB

Try this code, I changed the range of T1 and used element-wise operator in the equation for Eout1 %Constant Temperature and Cha...

4 días ago | 0

| accepted

Answered

How can find the solution of this matrix system?

Try fsolve(): https://www.mathworks.com/help/releases/R2020a/optim/ug/fsolve.html sol = fsolve(@(X) X*A*X.'-B, rand(size(A)))

How can find the solution of this matrix system?

Try fsolve(): https://www.mathworks.com/help/releases/R2020a/optim/ug/fsolve.html sol = fsolve(@(X) X*A*X.'-B, rand(size(A)))

4 días ago | 0

Answered

How to display a variable for x and y values from code in UI Table

Run this example x1 = 1; x2 = 2; x3 = 3; y1 = 4; y2 = 5; y3 = 6; x = [x1; x2; x3]; y = [y1; y2; y3]; t = table(x, y); ...

How to display a variable for x and y values from code in UI Table

Run this example x1 = 1; x2 = 2; x3 = 3; y1 = 4; y2 = 5; y3 = 6; x = [x1; x2; x3]; y = [y1; y2; y3]; t = table(x, y); ...

4 días ago | 0

Answered

Is there a way to make dirac delta function be 1 at the origin?

Replace dirac with kroneckerDelta syms x f(x) = heaviside(x); g(x) = diff(f); Result >> g(0) ans = Inf Now run g(x) = s...

Is there a way to make dirac delta function be 1 at the origin?

Replace dirac with kroneckerDelta syms x f(x) = heaviside(x); g(x) = diff(f); Result >> g(0) ans = Inf Now run g(x) = s...

4 días ago | 0

| accepted

Answered

Filtering by several criteria

Something like this New=Salaries.Age_49(Salaries.Area==1 & Salaries.Year==2019) % find is not necessary, logical indexing will ...

Filtering by several criteria

Something like this New=Salaries.Age_49(Salaries.Area==1 & Salaries.Year==2019) % find is not necessary, logical indexing will ...

4 días ago | 1

| accepted

Answered

How do I correctly type in the following functions into matlab

This is correct syntax syms theta t f1 = 1 + sin(theta)^2*csc(theta); f2 = 1/(1+sin(theta)); f3 = sin(t); f4 = sec(theta).^...

How do I correctly type in the following functions into matlab

This is correct syntax syms theta t f1 = 1 + sin(theta)^2*csc(theta); f2 = 1/(1+sin(theta)); f3 = sin(t); f4 = sec(theta).^...

4 días ago | 0

Answered

create plot with slice

Try this [X, Y, Z] = meshgrid(0:0.5:20, 0:0.5:20, 1:7); V = exp(-0.2*sqrt((X-10).^2+(Y-10).^2+(2*(Z-4)).^2)); % based on gue...

create plot with slice

Try this [X, Y, Z] = meshgrid(0:0.5:20, 0:0.5:20, 1:7); V = exp(-0.2*sqrt((X-10).^2+(Y-10).^2+(2*(Z-4)).^2)); % based on gue...

4 días ago | 0

| accepted

Answered

How to pass a changing value from workspaces to Simulink?

If the value is continually changing in the base workspace, you need to use MATLAB function block and evalin() to read the updat...

How to pass a changing value from workspaces to Simulink?

If the value is continually changing in the base workspace, you need to use MATLAB function block and evalin() to read the updat...

4 días ago | 1

| accepted

Answered

Trial to display Capital letters on excel

xlswrite is used to write numeric matrices. If you want to write text data, then use writetable() or writecell(). For example T...

Trial to display Capital letters on excel

xlswrite is used to write numeric matrices. If you want to write text data, then use writetable() or writecell(). For example T...

4 días ago | 0

Answered

How to insert a background image into a 3d plot?

Try something like this img = imread('peacock.jpg'); ax1 = axes(); imshow(img, 'Parent', ax1); ax2 = axes('Color', 'none...

How to insert a background image into a 3d plot?

Try something like this img = imread('peacock.jpg'); ax1 = axes(); imshow(img, 'Parent', ax1); ax2 = axes('Color', 'none...

4 días ago | 0

| accepted

Answered

How to create sum block like this (photo) on simulink?

See the add block: https://www.mathworks.com/help/releases/R2020a/simulink/slref/add.html. However, if you want to connect signa...

How to create sum block like this (photo) on simulink?

See the add block: https://www.mathworks.com/help/releases/R2020a/simulink/slref/add.html. However, if you want to connect signa...

4 días ago | 0

Answered

how can i solve this problem

In the expressions of kiv and kdv, there is kp in the denominator. So, you should start the list of Kp from a non-zero value, fo...

how can i solve this problem

In the expressions of kiv and kdv, there is kp in the denominator. So, you should start the list of Kp from a non-zero value, fo...

4 días ago | 0

| accepted