Feeds
답변 있음
I must solve ode equation system but dsolve gives me error
The third boundary condition is wrong as stated. You must use dv/ds at some position s (e.g. 200). %Geometric and Inertial Par...
I must solve ode equation system but dsolve gives me error
The third boundary condition is wrong as stated. You must use dv/ds at some position s (e.g. 200). %Geometric and Inertial Par...
4일 전 | 0
| 수락됨
답변 있음
How can I change a variable and collect an vector of outputs?
V_array = 0.5:0.1:20; % Material Parameters c0 = 0.2; % Alloy composition k = 0.28; % Partition Coefficient (conc solute in s...
How can I change a variable and collect an vector of outputs?
V_array = 0.5:0.1:20; % Material Parameters c0 = 0.2; % Alloy composition k = 0.28; % Partition Coefficient (conc solute in s...
4일 전 | 1
답변 있음
MLE of combined analytically and empirically defined distributions
MATLAB's "mle" accepts custom pdf's. If you write b as sin^2(p) and (1-b) as cos^2(p), it should work to estimate mu, sigma an...
MLE of combined analytically and empirically defined distributions
MATLAB's "mle" accepts custom pdf's. If you write b as sin^2(p) and (1-b) as cos^2(p), it should work to estimate mu, sigma an...
5일 전 | 0
답변 있음
Plot function for different values of two coupled variables
k5 = [0.1 0.2 0.3]; k6 = [0.3 0.5 0.7]; colors = ['b','r','g']; N = 3; hold on for i = 1:N [time,p,m] = fun(k5(i),k6(i...
Plot function for different values of two coupled variables
k5 = [0.1 0.2 0.3]; k6 = [0.3 0.5 0.7]; colors = ['b','r','g']; N = 3; hold on for i = 1:N [time,p,m] = fun(k5(i),k6(i...
6일 전 | 0
답변 있음
I need to create a cicle in which, for a specific value, it solves one set of equation or another. It doesn't compute.
Works for me. Maybe you use an older MATLAB release ? Lcz = 10; %Contact lenght [mm] delta0 = 25; %Softening Lenght [mm] delt...
I need to create a cicle in which, for a specific value, it solves one set of equation or another. It doesn't compute.
Works for me. Maybe you use an older MATLAB release ? Lcz = 10; %Contact lenght [mm] delta0 = 25; %Softening Lenght [mm] delt...
8일 전 | 0
| 수락됨
답변 있음
Variable might be set by a nonscalar operator
%% Define varaibles theta_deg=10:1:80; %% theta in 1 degrees increments theta_incline=18.05; theta_decline= 40.65; M=1; % ma...
Variable might be set by a nonscalar operator
%% Define varaibles theta_deg=10:1:80; %% theta in 1 degrees increments theta_incline=18.05; theta_decline= 40.65; M=1; % ma...
9일 전 | 1
| 수락됨
답변 있음
Can I specify different thermal conductivities for different regions in a space using Matlap PDE Toolbox? For example, the space is divided into a thermal conductivity space o
There are two ways: A good method is to generate the geometry such that it consists of a certain number of zones to which you c...
Can I specify different thermal conductivities for different regions in a space using Matlap PDE Toolbox? For example, the space is divided into a thermal conductivity space o
There are two ways: A good method is to generate the geometry such that it consists of a certain number of zones to which you c...
11일 전 | 0
| 수락됨
답변 있음
Finding x and y values of minimum z in 2-variable function.
z = @(x,y)(x.^2).*(y.^3)-1.4*(x.^2).*(y.^2)-3.91*(x.^2).*y+5.78*(x.^2)-... 11*x.*(y.^3)+15.4*x.*(y.^2)+43.01*x.*y-63....
Finding x and y values of minimum z in 2-variable function.
z = @(x,y)(x.^2).*(y.^3)-1.4*(x.^2).*(y.^2)-3.91*(x.^2).*y+5.78*(x.^2)-... 11*x.*(y.^3)+15.4*x.*(y.^2)+43.01*x.*y-63....
11일 전 | 0
답변 있음
Find best fit curve from multiple curves of different size
I parametrized the curves by normalized arc length. To compute the average curve, I took the mean of R- and Z-coordinates of the...
Find best fit curve from multiple curves of different size
I parametrized the curves by normalized arc length. To compute the average curve, I took the mean of R- and Z-coordinates of the...
12일 전 | 0
| 수락됨
답변 있음
How can I get splines subject to constraints?
This code looks helpful for your purpose: https://uk.mathworks.com/matlabcentral/fileexchange/7976-random-number-from-empirical...
How can I get splines subject to constraints?
This code looks helpful for your purpose: https://uk.mathworks.com/matlabcentral/fileexchange/7976-random-number-from-empirical...
12일 전 | 0
| 수락됨
답변 있음
How do I edit a loop to be able to store the variables and outputs used in each loop in a way which can be graphed?
Be careful here. In correlations for friction factors, log is usually meant as log to the basis of 10, not the natural logarithm...
How do I edit a loop to be able to store the variables and outputs used in each loop in a way which can be graphed?
Be careful here. In correlations for friction factors, log is usually meant as log to the basis of 10, not the natural logarithm...
14일 전 | 0
| 수락됨
답변 있음
Question solve(eqn)
Replace solve (f1, f2, f3, f4, f5, f6) by [a0,a1,a2,a3,a4,a5] = solve (f1, f2, f3, f4, f5, f6) But note that extrapolating t...
Question solve(eqn)
Replace solve (f1, f2, f3, f4, f5, f6) by [a0,a1,a2,a3,a4,a5] = solve (f1, f2, f3, f4, f5, f6) But note that extrapolating t...
14일 전 | 0
답변 있음
find is not working in a loop, it skips numbers
Never test two double precision numbers for equality. Because of floating point arithmetic, they will almost always be classifie...
find is not working in a loop, it skips numbers
Never test two double precision numbers for equality. Because of floating point arithmetic, they will almost always be classifie...
14일 전 | 0
| 수락됨
답변 있음
Can someone rectify this code?
My guess is that you work with an older MATLAB version where script and function parts cannot be mixed. Thus save function F =...
Can someone rectify this code?
My guess is that you work with an older MATLAB version where script and function parts cannot be mixed. Thus save function F =...
15일 전 | 0
답변 있음
elseif that goes through previous statements but with different parameters
if e(t)==1 nn1 = nn11; nn2 = nn21; elseif e(t)==2 nn1 = nn12; nn2 = nn22; elseif e(t)==3 nn1 = nn13; nn2 = nn23...
elseif that goes through previous statements but with different parameters
if e(t)==1 nn1 = nn11; nn2 = nn21; elseif e(t)==2 nn1 = nn12; nn2 = nn22; elseif e(t)==3 nn1 = nn13; nn2 = nn23...
16일 전 | 0
답변 있음
syms to another .m file
Call the other .m-file with the syms-equation (or function) as input argument. syms x f = x.^2; result = fun(f) function res...
syms to another .m file
Call the other .m-file with the syms-equation (or function) as input argument. syms x f = x.^2; result = fun(f) function res...
16일 전 | 0
답변 있음
Clarification regarding Sensitivity Analysis of a coupled ODE system using the odesensitivity function
Start with the simple example y'(t) = p(1)*y(t), y(0) = 1. The solution is y(t) = exp(p(1)*t). The (local) sensitivity is ...
Clarification regarding Sensitivity Analysis of a coupled ODE system using the odesensitivity function
Start with the simple example y'(t) = p(1)*y(t), y(0) = 1. The solution is y(t) = exp(p(1)*t). The (local) sensitivity is ...
16일 전 | 1
| 수락됨
답변 있음
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...
17일 전 | 1
| 수락됨
답변 있음
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...
19일 전 | 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 =...
21일 전 | 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 ...
22일 전 | 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
22일 전 | 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,...
29일 전 | 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. ...
29일 전 | 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 ...
29일 전 | 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 * ...
대략 1개월 전 | 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...
대략 1개월 전 | 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) < ...
대략 1개월 전 | 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...
대략 1개월 전 | 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))],[])
대략 1개월 전 | 0
| 수락됨