Answered
Determine y for a function with a symbolic variable x
syms x F(x) = x.^2; F(0)

4 years ago | 0

Answered
Rotate the coordinate system to align an existing plane with Y'Z' plane
https://stackoverflow.com/questions/9423621/3d-rotations-of-a-plane But are you sure that the parabola in the YZ plane is not a...

4 years ago | 0

Answered
How to solve a system of differential equations using ode45 and vary the magnetic field and plot the solutions as a function of this field?
b=[0:0.1:10]; d0=0.2 wb=1 wd=wb-d0 wl=wb db=0.18 dd=0.05 a=0.02 Ua=0.15 Ub=0.02 g1= 0.001 g2=g1 g3= 0.0001 g4=g3 %...

4 years ago | 0

Answered
Problems with declaring the variable right
xg= 7*2*5*1*6*3; xh= 3/10; F1=3; F2=100; T= 1/500; fun = @(k1,i) xg*sin(2*pi*F1*(k1-i)*T); fun(14,0:14)

4 years ago | 0

Answered
Spectral factorization of polynomial x(s)
Let a(s)*a(-s)+b(s)*b(-s) = p0 + p1*s + ... + p2n*s^(2*n) Determine the roots of a(s)*a(-s) + b(s)*b(-s) The 2*n roots ap...

4 years ago | 0

| accepted

Answered
Correctly evaluate exponential function for limit values
function result = f(x,g,h,N) result = N^2*ones(size(x)); K = g(x).*h(x) ~= 0; if (any (K(:))) result(K) = your exp...

4 years ago | 0

Answered
"Not enough input arguments, Error in my_ode_without_tld_1 (line 24) F = interp1(tdata,ydata)" why this error is showing?
If F has the same number of elements as i, the following should work: i = 0.1:0.1:30; y0 = [0 0]; F = load('shear force.dat')...

4 years ago | 1

Answered
How to find coefficient matrix?
I assume the last xi^n should be xi^m in sum_{i=1}^{n} y_i*x_i^n x = [1 3 5 7 9]; y = [3 -1 3 78 -0.2]; m = 4; xx = x.^(...

4 years ago | 0

| accepted

Answered
How to use Monte Carlo simulation to calculate the area of polygon?
Randomly create points inside the bounding box. Decide which of the points are inside (P_i) and which of the points are outside...

4 years ago | 0

Answered
FMINCON requires the following inputs to be of data type double
Although I don't understand your problem setup because the variables in the objective function are not influenced by your constr...

4 years ago | 0

| accepted

Answered
Error using plot3 not enough input arguments
plot3(i_1, j_1, k_1) plot3(i_2, j_2, k_2) plot3(i_3, j_3, k_3) plot3(i_4, j_4, k_4) instead of plot3(i_1, j_1, k_1, tspan) ...

4 years ago | 0

| accepted

Answered
Problem with PDE resolution
function [c,f,s]=heatpde(x,t,u,dudx) c = [1 ;1]; f = [0.1*dudx(1);0.5*dudx(2)]; a = 0.2*u(1)*u(2)/(1+0.1*u(1)+0.02*u(2)+0.03*...

4 years ago | 1

Answered
Spatio-temporal plug flow reactor simulation with method of lines
function PFR_t_L_sim_v2_1 % function method_of_lines clear all; clc; close all function dCdt = reaction(t,C) C1 ...

4 years ago | 1

| accepted

Answered
Maximum Likelihood Estimation function
x = your data vector fun = @(a) n/a + sum(x) - 2*a*sum(exp(a*x)./(exp(a*x)+1); a = fzero(fun,1)

4 years ago | 0

| accepted

Answered
Hello, the code to enter and raise the integral does not run, what is wrongly written?
a=0.286; b=0.1851; c=1.272; f=@(t)t.^(0.5*c).*exp(-0.5*a*t); I = sqrt(b)*integral(f,0,Inf)

4 years ago | 0

Answered
Solve system of equations without Symbolic Math Toolbox for Compiler
Did you try "solve" on your system of equations with the numerical vlist coeffcients replaced also by symbolic variables ? syms...

4 years ago | 1

| accepted

Answered
Error fit: Complex value computed by model function
Fit under the constraint b^2-a^2 >= 0

4 years ago | 0

Answered
pde mass transfer with reaction
clc;clear all;close all; L = 1; x = linspace(0,L,50); t = linspace(0,1,50); % t = [linspace(0,0.05,20), linspace(0.5,5,10)];...

4 years ago | 0

Answered
Crank-Nicolson scheme for system of differential equations
y0(1,1) = 0.2; y0(2,1) = 0; x = 0:0.125:100; h = x(2)-x(1); y = zeros(2,numel(x)); y(:,1) = y0; for i4 =...

4 years ago | 0

| accepted

Answered
Need help plotting this
n = 36; T=20*10^-3; t=0:T/1000:T; w=2*pi*1/T; %f=i(t) f=@(t)0+100.*(t>1*T/12).*(t<5*T/12)-100.*(t>7*T/12).*(t<11*T/12); a0...

4 years ago | 1

| accepted

Answered
Help in looping and iterating constant values in differential equation which is being solved my numerical method.
Define all time-dependent parameters as function handles and apply these handles in your function definition. As an example for...

4 years ago | 0

Answered
Using Implicit Euler Method with Newton-Raphson method
f = @(t,y) -20*t*y^2; f_y = @(t,y) -40*t*y; t0 = 0; T = 1; y0 = 1; h = 0.01; tol = 1e-8; N = 100; y = imp_euler(f,f_y,t0...

4 years ago | 1

| accepted

Answered
How do I create a loop for this calculation in MATLAB?
%constants c = 1.1e-10; m = 3.3; p500 = [ -0.3142 2.3172 -7.0249 11.2867]; p2000 = [ -1.2577 9.2728 -28.1056 45...

4 years ago | 0

| accepted

Answered
Error using fzero function
I changed v = -4*hp.*A(h)./pi*d^2; %vitesse dans le tuyau to v = -4*hp.*A(h)./(pi*d^2); %vitesse dans le tuyau For bett...

4 years ago | 0

Answered
Hi guys this question is on linear programming and i am trying to figure out how to define inequalities with unknown variables.
help linprog and https://de.mathworks.com/matlabcentral/fileexchange/24816-plot_feasible-m

4 years ago | 0

Answered
Optimal control problem with integral cost function and both initial and terminal conditions
I think this part % convert symbolic objects to strings for using ’dsolve’ eq1 = strcat('Dx1=',char(Dx1)); %concatena le strin...

4 years ago | 0

| accepted

Answered
Find row with unequal distance
idx = find(diff(diff(A)) > 0,1,'first'); A(idx+2)

4 years ago | 0

Answered
Looking for method to simplify equation within MATLAB
syms a b c d X = 2*a+3*b+7*c+d; X = subs(X,d,2*a+4*b)

4 years ago | 0

| accepted

Answered
ı want to solve this question by excel formulas?
Without guarantee: disbursement = (5000*1.04^23 + 2000*1.04^4*(1.04^19-1)/0.04)/((1.04^4-1)/0.04) thus approximately 18150 $.

4 years ago | 1

Answered
Choosing balls from the boxes
positions_red = 1:4; positions_blue = 5:8; positions_green = 9:12; position_black = 13; Ntrials = 1e5; succ...

4 years ago | 1

| accepted

Load more