Réponse apportée
Error on Symbolic calculation : "Empty sym : 0-by-1"
Try this code. By the way: numel(v1(i,j)), numel(v2(i,j)) and numel(v3(i,j)) always equals 1 because v1(i,j), v2(i,j) and v3(i,...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
symbolic function give error list of equations must not be empty
syms Shy Por_den = 0.4:0.1:0.8; W= 1.2; rho_ma = 2.75; rho_water = 1.03; rho_hydrate = 0.90; Measure_VEL=1.4:0.1:1.8; vw= 1.49...

presque 3 ans il y a | 0

Réponse apportée
Need help in using trapz to integrate a definite function
Maybe you mean clear all c=3*10^8; % speed of light in vaccum h=6.626*10.^-34; % Planck constant k=1.38*10.^-23; % Boltz...

presque 3 ans il y a | 0

Réponse apportée
Problem in solving equation with Gamma distribution parameters as unknowns
I'd try it numerically. Better initial values for y,z and la might give convergence. fun = @(y,z,la)[gaminv(0.95,y,z)-gaminv(0....

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to fit a histogram plot to a poisson distribution
Simply use lambdahat = poissfit(spacing_ratios) But I'm surprised you want to fit data that take non-integer values with a dis...

presque 3 ans il y a | 0

Réponse apportée
why the plot of C is a constant through the time (differential equation résolution)
You start with an initial value y02 = 0. The rate of change of Y2 is z2 = 4.*(0.1.*exp(-5000./(8.314.*300))).*y, thus 0 since ...

presque 3 ans il y a | 1

Réponse apportée
I want to know which of the two spaces each point belongs to in a 3-dimensional space divided into two parts by a single plane.
The two half-spaces that IR^3 is divided in by the plane are a(x-p)+b(y-q)+c(z-r) < 0 and a(x-p)+b(y-q)+c(z-r) > 0. So for a gi...

presque 3 ans il y a | 4

| A accepté

Réponse apportée
Solve closed loop system equation with disturbance input via function handle
By using interp1 to interpolate the column value to the time instant of the ODE integrator. Or use your own integrator with a f...

presque 3 ans il y a | 1

Réponse apportée
How do i store the output from my for loop for each iteration
You must return "store", not "sol" to the program calling the function "tosolve".

presque 3 ans il y a | 0

Réponse apportée
Find nth value in a matrix and plot on graph
Run = 6; i72=zeros([max(Run) 1]); i68=i72; i62=i72; i58=i72; i22=i72; i18=i72; i12=i72; i08=i72; for i = 1:Run if i==1 ...

presque 3 ans il y a | 0

Réponse apportée
In an assignment A(:) = B, the number of elements in A and B must be the same. How can I fix this error?
For Run = 1, you get empty results for i72(1),i68(1),.... But i71(1),i68(1),... cannot be removed from the 2x1 arrays i71, i68,....

presque 3 ans il y a | 1

| A accepté

Réponse apportée
how to index the stating position of something?
x1 = [1 0 2 3 8 5 6 7 0 0 0 0 0 2 5 3 0 0 6 4]; out1 = LengthAndPosnZeros(x1) x2 = [1 0 0 8 5 0 0 3 3 3 3 0 0 0 0]; out2 = ...

presque 3 ans il y a | 0

Réponse apportée
I have an error in my program. the error is about 'Error using letter_detection (line 4) Not enough input arguments.' using Matlab R2015A and I named the file letter_detection
You should test the procedure with a simple example: Write a function function s = addition(a,b) s = a+b; end and save it...

presque 3 ans il y a | 0

Réponse apportée
I do not understand exit message given by lsqnonlin,
Should be function [c,ceq] = myNonlinearConstraints(x) V_sim= evalin('base','V_sim'); Vsim_max = max(V_sim); c(1) = x(...

presque 3 ans il y a | 2

Réponse apportée
solution of a system of PDEs with finite difference method and runge kutta second order
Where is the x in your equations ? I only see differentiation with respect to t. And shouldn't the 2nd order differentiation in ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
I don't know how to include specific conditions in my code
a = [0 0 9 0; 0 0 1 8; 0 0 4 0; 0 0 2 3; 0 6 7 5]; z = lastzerorow(a) function z = lastzerorow(a) ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Finite difference method for a system of pde
These kind of transformations are usually made to transform a system of PDEs to a system of ODEs that can be solved more easily....

presque 3 ans il y a | 0

Réponse apportée
How to solve PDE with second order in the time derivative in Matlab?
You could try du/dt = v (1+t^2)*dv/dt +t*v = (1+x^2)*d^2u/dx^2 + x*du/dx du/dx = dv/dx = 0 at x = 0 % dv/dx = 0 is artifici...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
I'm trying to do harmonic analysis, but it says that the t_get18consts function is not defined.
From https://www.eoas.ubc.ca/~rich/ (2019) I've modified v1.3b by running it through the matlab editor and fixing a lot o...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Solving linear systems in Matlab
x = A\(u-A*b) But it's the same as x = A\u - b

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Efficient searching to find the first element of an array meeting a condition
"find" will use the "first" option by default which means that the command will return the first occurence of the event and will...

presque 3 ans il y a | 0

Réponse apportée
Plot multiple graph after solving
syms y t g f1 = -2*g*t.^3/((1 - y).^(1-2*g)) + 2*g*(3 - t.^2)^2./((2 - t).*y.^(1-2*g)) + (8*g*t)./(y.^(1-2*g)) - 2*g*(3 - 2*t)....

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Nested Numerical Integration with multivariable functions
d=.01; %1/e patch diameter; D=.35; %Aperture Diameter L=7e3; %Propagation distance; coeff=-11.64*(16/pi)^2*D^(-1/3); fun = ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How to handle interface boundary condition in convection-diffusion reaction equation for pressure, velocity and concentration equation?
If the interface conditions are continuity of the variable and the flux, the finite element method will automatically respect th...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How to obtain an array of the indices from the original array when using nchoosek
You better get B from C, not C from B: A = [7, 8, 9]; v = 1:numel(A); C = nchoosek(v,2) B = A(C)

presque 3 ans il y a | 1

Réponse apportée
How to find the intersection values of line and curve?
https://uk.mathworks.com/matlabcentral/answers/2009582-how-to-find-the-intersection-values?s_tid=srchtitle

presque 3 ans il y a | 0

Réponse apportée
Integration with multiplication of whittaker and bessel function
MATLAB is not able to get an explicit antiderivative for "kr_real". That's why "int" returns the integral expression unchanged -...

presque 3 ans il y a | 0

Réponse apportée
How do I fit two function in a same data at a time depending on the range ?
t = load("t.mat"); t = t.t; y = load("y.mat"); y = y.y; value_min = Inf; for i = 1:numel(t) fun1 = @(time)time.^2; ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
problem with fmincon: constraints are not satisfied
You cannot define your constraints in the objective function. Thus "c" and "ceq" are not used by "fmincon". To account for them,...

presque 3 ans il y a | 1

Réponse apportée
Averaging data from seconds to three seconds because of different time variables
I'd repeat the data for 3 seconds three times. This does not manipulate your data with interpolation or averaging.

presque 3 ans il y a | 0

| A accepté

Charger plus