답변 있음
Invalid expression during a function handle
Must read Kernel = @(x) ... instead of Kernel = @x ...

대략 2년 전 | 2

답변 있음
Help understanding how function handle is used
Somewhere in your code you defined a fitness function which assumes that inputs j and k are integers function fitness = Ft(x,j,...

대략 2년 전 | 0

| 수락됨

답변 있음
Error in for loop: Index exceeds matrix dimensions.
matrix_f=[1 2 3; 1 2 3; 4 5 6; 7 8 9; 7 8 9; 10 11 12]; unique(matrix_f,'stable','rows') Note that this code will remove all d...

대략 2년 전 | 1

답변 있음
Why does this technique not work?
I already gave you the code how to order a vector according to the ordering of "u". Why don't you use it ? Your method is wrong...

대략 2년 전 | 1

| 수락됨

답변 있음
Setting unknown constants in equation for known data
how can i do that ? By solving the system yi - f(xi,a,b,c) = 0 for a,b and c. Here, (xi,yi) are your data points. If f is l...

대략 2년 전 | 1

답변 있음
lsqcurvefit issues due to variables being several orders of magnitude different
load('V1.mat') load('Vp.mat') load('data.mat') V = [V1, Vp]; %voltages a = 1.1792; b = 0.5; e = 1.60217662e-19; Area ...

대략 2년 전 | 0

답변 있음
Please help me understand output from discretize
X=[.01:.01:1] ; % - example data uniformly going form .01 to 1 in steps of .01 binEdges=[0:0.01:1]; %- the bind edges X(6)>b...

대략 2년 전 | 0

| 수락됨

답변 있음
How can I solve the error "Unable to solve the collocation equations -- a singular Jacobian encountered" in bvp4c?
Your ODE system is linear - thus you can determine its general solution having 7 free parameters. But incorporating of your boun...

대략 2년 전 | 0

| 수락됨

답변 있음
How to Graph integrals?
According to proposition 4, the red curve should be the inverse bidding function X and the blue curve should be the inverse bidd...

대략 2년 전 | 0

| 수락됨

답변 있음
how to plot function with 2 variables? using fsolve or bisection ?
Use "fimplicit": https://uk.mathworks.com/help/matlab/ref/fimplicit.html

대략 2년 전 | 0

답변 있음
how to get a good estimate of the positive parameters that will give a good fit of the curves to real data?
You should avoid defining the same data, parameters and variable definitions multiple times in your code (specific_data, gamma, ...

대략 2년 전 | 1

| 수락됨

답변 있음
How can I find a unique solution within tolerance using solve?
As long as rank(A) equals 3 in the below code, your system of linear equations has a unique solution. syms Rx Risop Rison V1=2...

대략 2년 전 | 1

답변 있음
function must return a column vector
Allocate dy as a column vector before assigning values to it: %Ordinary differential equation dy = zeros(4,1); dy(1)=alpha*(1...

대략 2년 전 | 0

답변 있음
I'm having trouble solving a system of nonlinear equations with the fmincon function.
Use % Options for fmincon options = optimoptions('fmincon', 'Algorithm', 'interior-point', 'Display', 'off','ConstraintToleran...

대략 2년 전 | 0

| 수락됨

답변 있음
Simulation - number of samples
Is there a preset (optimum) value and how is this determined? As big as necessary and as small as possible. You will have to te...

대략 2년 전 | 1

| 수락됨

답변 있음
Need help with homework.
Note that the name of the German physician was Fahrenheit, not Farenheit. % prompt for user to choose which conversion chosen_...

대략 2년 전 | 0

답변 있음
Weird bugs when solving three coupled second order differential equations using ode45
syms x1(t) x2(t) y(t) t0 = [0 1]; % y0 must be given in the order as prescribed by S (see below), thus % y0 = (x2(0),dx2/dt(0...

대략 2년 전 | 0

| 수락됨

답변 있음
Bessel function has problems in converting symbolic function into handle function.
It works for the numerical "besselj" function. Its derivative is given here: https://uk.mathworks.com/matlabcentral/answers/93...

대략 2년 전 | 0

| 수락됨

답변 있음
Bessel function has problems in converting symbolic function into handle function.
This code seems to work. Can you show us where you encounter problems ? syms x n = 12; f = sqrt(sym(pi)/(2*x))*besselj(n+1/2,...

대략 2년 전 | 0

답변 있음
optimization expression includes an integration
c = optimvar("c",1,1,'Type','continuous','LowerBound',0.1,'UpperBound',10); g1 = @(x,c) exp(-0.5*(x./c).^2)./sqrt(2*pi*c^2); o...

대략 2년 전 | 1

| 수락됨

답변 있음
How can I clear an error "The expression to the left of the equals sign is not a valid target for an assignment?"
You have seven differential equations, but you only specify six boundary conditions. That's mathematically incorrect. plot_velo...

대략 2년 전 | 0

답변 있음
I am getting an error
Do you want to overwrite the MATLAB function "convolution1dLayer" by your own function ? function output = convolution1dLayer(i...

대략 2년 전 | 0

답변 있음
Why does this code give error?
Force the array ix1 to be of the same length as ix by explicitly allocating it with the size of ix: % Run the GBO algorithm...

대략 2년 전 | 0

| 수락됨

답변 있음
Problem Using the Median Function with Complex Numbers
c = a + (b-a)/2; k = (sign(a) ~= sign(b)) | isinf(a) | isinf(b); c(k) = (a(k)+b(k))/2; But in every case, you set...

대략 2년 전 | 0

답변 있음
issue with fmincon function.
I guess the objective function should read obj_fun = @(x) -(Nup - Nt) / Nup * sum(log2(1 + x(1:Ns) ./ (sigma2 * (vecnorm(reshap...

대략 2년 전 | 0

| 수락됨

답변 있음
Index in position 1 exceeds array bounds. Index must not exceed 18.
data = (EEG.icaweights(opt.component,:)*EEG.icasphere)*data(EEG.icachansind,:); You are aware that you overwrite the matrix "da...

대략 2년 전 | 1

| 수락됨

답변 있음
How do I construct matrices of multiple variables and plot a graph
tspan=[0 3]; x0=100; y0=0; z0=[x0;y0]; [tSol, zSol]=ode45(@odefun,tspan,z0); plot(tSol, zSol); function dzdt=odefun(t,z) ...

대략 2년 전 | 1

답변 있음
I don't know what this means
Most probably, you don't have write permission in the directory to which you want to unzip 'MerchData.zip'.

대략 2년 전 | 0

답변 있음
Coupled ODEs by ode45 and could not get the figures
% Initial conditions Y0 = [298; 0.75; 0.04; 0.015; 0.0331; 0]; % [T0; Xa0; Xc0; Xs0; Z0; Soc0] % Time span tspan = [0 3000]; ...

대략 2년 전 | 1

답변 있음
Can integral2 left a variable inside?
@Guan Hao You cannot simply remove the w in your expression as suggested by @Umar. I'd do the general integration first and the...

대략 2년 전 | 0

| 수락됨

더 보기