Feeds
답변 있음
How to make ode45 store/return only results of every n-th time step to reduce memory use?
You can specify the times when the solution should be saved in the input variable "tspan" to "ode45". And you should test wheth...
How to make ode45 store/return only results of every n-th time step to reduce memory use?
You can specify the times when the solution should be saved in the input variable "tspan" to "ode45". And you should test wheth...
대략 8시간 전 | 0
답변 있음
Energy Harvesting of Cantilever Beam with MSMA alloy1
I inserted "warning('off')" at the start of your code because your matrix M in your function "system_eqs" is singular and MATLAB...
Energy Harvesting of Cantilever Beam with MSMA alloy1
I inserted "warning('off')" at the start of your code because your matrix M in your function "system_eqs" is singular and MATLAB...
2일 전 | 0
| 수락됨
답변 있음
Sampling from inverse gamma distribution by specifing mean and standard deviation
It works for mu = 0.5, sig = 0.5, e.g. . It seems that your distribution parameter "a" is too close to the critical value of a =...
Sampling from inverse gamma distribution by specifing mean and standard deviation
It works for mu = 0.5, sig = 0.5, e.g. . It seems that your distribution parameter "a" is too close to the critical value of a =...
4일 전 | 0
| 수락됨
답변 있음
How to code an equation with that integrates a vector.
If there is no closed-form expression for u (e.g. if u depends on x), you can solve the vector-differential equation dx/dt = u ...
How to code an equation with that integrates a vector.
If there is no closed-form expression for u (e.g. if u depends on x), you can solve the vector-differential equation dx/dt = u ...
5일 전 | 0
답변 있음
The surface area won't round to one decimal place and I don't know how to get rid of the 'e's.
https://uk.mathworks.com/help/matlab/ref/fprintf.html https://uk.mathworks.com/help/matlab/ref/format.html
The surface area won't round to one decimal place and I don't know how to get rid of the 'e's.
https://uk.mathworks.com/help/matlab/ref/fprintf.html https://uk.mathworks.com/help/matlab/ref/format.html
5일 전 | 1
답변 있음
Need to correct the following script in part of Infinitely Long Horizontal Cylinder (to be of perfect circular base)
%% 2. Infinitely Long Horizontal Cylinder subplot(1,3,2); theta = linspace(0, 2*pi, 30); x_v = linspace(-10, 0, 20); [Theta,...
Need to correct the following script in part of Infinitely Long Horizontal Cylinder (to be of perfect circular base)
%% 2. Infinitely Long Horizontal Cylinder subplot(1,3,2); theta = linspace(0, 2*pi, 30); x_v = linspace(-10, 0, 20); [Theta,...
12일 전 | 0
| 수락됨
답변 있음
Grey box model of 1d heat diffusion in a rod (official mathworks example)
I think it will be simpler to couple "pdepe" for the solution of your PDE and "lsqnonlin" for optimizing your model parameters. ...
Grey box model of 1d heat diffusion in a rod (official mathworks example)
I think it will be simpler to couple "pdepe" for the solution of your PDE and "lsqnonlin" for optimizing your model parameters. ...
12일 전 | 0
| 수락됨
답변 있음
trouble using pdepe to solve system of pdes
Your initial condition for u(2) at x = 0 is not consistent with your boundary condition. Use function u0 = icfun(x) global ...
trouble using pdepe to solve system of pdes
Your initial condition for u(2) at x = 0 is not consistent with your boundary condition. Use function u0 = icfun(x) global ...
12일 전 | 0
| 수락됨
답변 있음
How plot 2d of more than 3 function and substitute the number in each function separate parameter?
y=@(x,t,m)real(((-0.385e1 .* tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) .^ (0.1e1 ./ m ./ 0.2e1)) .* exp(i * (0.431e1 * ...
How plot 2d of more than 3 function and substitute the number in each function separate parameter?
y=@(x,t,m)real(((-0.385e1 .* tanh(-x - 0.310e1) - 0.385e1 * coth(-x - 0.310e1)) .^ (0.1e1 ./ m ./ 0.2e1)) .* exp(i * (0.431e1 * ...
14일 전 | 1
| 수락됨
답변 있음
Help with the Deflection of a Plate in MATLAB
You are trying to solve the heat conduction equation with a homogeneous heat sink -q/D and boundary temperature 0. Is this the s...
Help with the Deflection of a Plate in MATLAB
You are trying to solve the heat conduction equation with a homogeneous heat sink -q/D and boundary temperature 0. Is this the s...
15일 전 | 0
| 수락됨
답변 있음
Time dependent variable in plot.
The simplest method is to define x, compute y in a loop and plot: x = 0:0.1:15; for i = 1:numel(x) if x(i) >= 0 & x(i) < ...
Time dependent variable in plot.
The simplest method is to define x, compute y in a loop and plot: x = 0:0.1:15; for i = 1:numel(x) if x(i) >= 0 & x(i) < ...
16일 전 | 1
| 수락됨
답변 있음
Solving Advection Equation PDE with 2nd order Accuracy
Usual second-order schemes for the advection equation will always produce oscillations. Section 3.1.3 of the enclosed article su...
Solving Advection Equation PDE with 2nd order Accuracy
Usual second-order schemes for the advection equation will always produce oscillations. Section 3.1.3 of the enclosed article su...
16일 전 | 0
| 수락됨
답변 있음
How can I use fmincon with general (user defined) nonlinear constraints?
g = @(x)deal([gl(x(1:nx),x(nx+1:nx+ny));gf(x(1:nx),x(nx+1:nx+ny))],[])
How can I use fmincon with general (user defined) nonlinear constraints?
g = @(x)deal([gl(x(1:nx),x(nx+1:nx+ny));gf(x(1:nx),x(nx+1:nx+ny))],[])
17일 전 | 0
| 수락됨
답변 있음
Assign fitlme output to a variable
See https://uk.mathworks.com/help/stats/linearmixedmodel.html The functions that can be applied to a fitlme object are: a...
Assign fitlme output to a variable
See https://uk.mathworks.com/help/stats/linearmixedmodel.html The functions that can be applied to a fitlme object are: a...
17일 전 | 0
| 수락됨
답변 있음
Avoiding -0.0000 as an output
The results for d2,...,d4 aren't exactly 0 because of floating point errors in their computation. So without artificially manipu...
Avoiding -0.0000 as an output
The results for d2,...,d4 aren't exactly 0 because of floating point errors in their computation. So without artificially manipu...
18일 전 | 0
| 수락됨
답변 있음
solve symbolic eigenvalue problem
If you want an analytical expression for the eigenvalues dependent on the parameter a, your matrix A must have dimension <= 4. ...
solve symbolic eigenvalue problem
If you want an analytical expression for the eigenvalues dependent on the parameter a, your matrix A must have dimension <= 4. ...
18일 전 | 0
답변 있음
problem to solve incorrrect
%% R-RRR clear all; clc; close all % Input data AB=0.325; %(m) BC=0.938; %(m) CD=0.675; %(m) CE=0.6; %(m) xD=0.8; %(m) y...
problem to solve incorrrect
%% R-RRR clear all; clc; close all % Input data AB=0.325; %(m) BC=0.938; %(m) CD=0.675; %(m) CE=0.6; %(m) xD=0.8; %(m) y...
21일 전 | 0
답변 있음
Monte Carlo integration (hit or miss) to find the area of a circle of radius R
You compare the area of the square with side length R and corner points (0,0), (R,0), (R,R) and (0,R) with the area of the quart...
Monte Carlo integration (hit or miss) to find the area of a circle of radius R
You compare the area of the square with side length R and corner points (0,0), (R,0), (R,R) and (0,R) with the area of the quart...
21일 전 | 0
| 수락됨
답변 있음
Finding parameters by fitting data to a system of ODEs with lsqnonlin
syms T1(t) T0(t) s d g eqn1 = diff(T0,t) == s - (d+g) *T0 ; eqn2 = diff(T1,t) == 2*d*T0 + (d-g)*T1; sol = dsolve([eqn1,eqn2])...
Finding parameters by fitting data to a system of ODEs with lsqnonlin
syms T1(t) T0(t) s d g eqn1 = diff(T0,t) == s - (d+g) *T0 ; eqn2 = diff(T1,t) == 2*d*T0 + (d-g)*T1; sol = dsolve([eqn1,eqn2])...
22일 전 | 1
답변 있음
Can pdepe solve a system of two second-order equations?
Goto https://uk.mathworks.com/matlabcentral/fileexchange/97437-pde1dm download the code, goto folder "documents" and study ex...
Can pdepe solve a system of two second-order equations?
Goto https://uk.mathworks.com/matlabcentral/fileexchange/97437-pde1dm download the code, goto folder "documents" and study ex...
22일 전 | 0
| 수락됨
답변 있음
Error in flood_algorithm_rtc_pv (line 22) best_fitness = objective_function(best_solution, V_data, I_data); i don not understand this error
V_data and I_data must be of the same size. This is not the case in your code.
Error in flood_algorithm_rtc_pv (line 22) best_fitness = objective_function(best_solution, V_data, I_data); i don not understand this error
V_data and I_data must be of the same size. This is not the case in your code.
23일 전 | 1
| 수락됨
답변 있음
Issues solving a system of 2, second order, differential equations with ode45
Replace Cd = 0,45 ;% drag coef aircraft [-] rho_Air = 1,2 ...
Issues solving a system of 2, second order, differential equations with ode45
Replace Cd = 0,45 ;% drag coef aircraft [-] rho_Air = 1,2 ...
24일 전 | 2
| 수락됨
답변 있음
simulating rolling 1 and 2 dice
You get a discrete pdf and cdf for the one and two dice-roll experiments you describe. So it doesn't make sense to smoothe resul...
simulating rolling 1 and 2 dice
You get a discrete pdf and cdf for the one and two dice-roll experiments you describe. So it doesn't make sense to smoothe resul...
24일 전 | 0
답변 있음
Very new to this and need help making a contour plot that shows correlation between weight of powder, bullet seating depth, and group size.
What is the problem using the contourf command ? All you need is the matrix MOA - I created it using random numbers. Varget = 4...
Very new to this and need help making a contour plot that shows correlation between weight of powder, bullet seating depth, and group size.
What is the problem using the contourf command ? All you need is the matrix MOA - I created it using random numbers. Varget = 4...
24일 전 | 0
답변 있음
Hello everyone, can anyone provide me the matlab code of FD SLIC algorithm or FM SLIC algorithm
https://uk.mathworks.com/matlabcentral/fileexchange/50184-slic-superpixels-for-e-cient-graph-based-dimensionality-reduction-of-h...
Hello everyone, can anyone provide me the matlab code of FD SLIC algorithm or FM SLIC algorithm
https://uk.mathworks.com/matlabcentral/fileexchange/50184-slic-superpixels-for-e-cient-graph-based-dimensionality-reduction-of-h...
24일 전 | 1
답변 있음
Eliminate for-loop in recursive computation?
pn_out = cumprod(fact).*(-y).^(m+1) But I'm not sure this will be faster than your loop, especially y.^(1:n) compared to a recu...
Eliminate for-loop in recursive computation?
pn_out = cumprod(fact).*(-y).^(m+1) But I'm not sure this will be faster than your loop, especially y.^(1:n) compared to a recu...
24일 전 | 0
| 수락됨
답변 있음
What happens if I set both RelTol and AbsTol for ODE45 and/or both TolX and Tolfun for FSOLVE?
Do these functions refine steps, etc. until both requirements are satisfied or only one of them? Both. Read about error contro...
What happens if I set both RelTol and AbsTol for ODE45 and/or both TolX and Tolfun for FSOLVE?
Do these functions refine steps, etc. until both requirements are satisfied or only one of them? Both. Read about error contro...
26일 전 | 0
답변 있음
Which statistic is minimized in curve fitting app
My question is what parameter/statistic is minimized to make a fit? SSE (maybe weighted if you specify weights for the measurem...
Which statistic is minimized in curve fitting app
My question is what parameter/statistic is minimized to make a fit? SSE (maybe weighted if you specify weights for the measurem...
26일 전 | 1
답변 있음
Help with MATLAB symbolic toolbox
Can't you use "dsolve" ? If not, use % Find the value of C1 interm of C2 C1_sol = vpa(solve(yp, C1),4) % Sub C1 into equat...
Help with MATLAB symbolic toolbox
Can't you use "dsolve" ? If not, use % Find the value of C1 interm of C2 C1_sol = vpa(solve(yp, C1),4) % Sub C1 into equat...
27일 전 | 0
| 수락됨
답변 있음
Find limits satisfying a condition on an integral
x = linspace(0, 2*pi, 20); y = sin(x); lowLimIndex = 1; target = 2; [~,upLimIndex] = min(abs(cumtrapz(x(lowLimIndex:end),y(l...
Find limits satisfying a condition on an integral
x = linspace(0, 2*pi, 20); y = sin(x); lowLimIndex = 1; target = 2; [~,upLimIndex] = min(abs(cumtrapz(x(lowLimIndex:end),y(l...
28일 전 | 0
| 수락됨