Beantwortet
Anyone know how to solve 2*x^2+2*y^2=5, x*y=1 without using command syms?
x = roots([2 0 -5 0 2]) y = 1./x res1 = 2*x.^2+2*y.^2-5 res2 = x.*y-1

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
May I ask what MATLAB code for expected value is by fitting a Poisson distribution?
A = 1:100; lambdahat = poissfit(A)

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Linear Fitting starting from a value
Sure. Use l(x) = a*x + 100 as model function and fit the parameter a. xdata = ...; % your xdata as column vector ydata = ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to fill a matrix without using loop in matlab?
If you want to plot the partial sums of the Fourier series, you will have to keep the last loop, I guess. close all; clear; clc...

fast 4 Jahre vor | 0

Beantwortet
How to plot the variations for integrating parameter
Note that integral(H2Ox, 183000, Inf) = Inf !! H2Ox = @(EA) -0.0023*(-8/(48000^8))*(EA-183000).^7; H2Oz = @(y) integral(H2Ox, ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Solve the complex equations
syms x real syms y real a=2*(x+y*j)==6-3j; sol = solve(a,[x,y]); sol.x sol.y

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
I would like to make surface plot of my probability of failure curve?
clear all; mue=0.82; %mean of unbiased factor of study case sige=0.189; %SD of unb...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I put a loop here?
V = [0.5 1 2 3 4 6 10].'; del = 0:1:90; del_r = del.*pi./180; x = V.*tan(del_r); del_r2 = atan(x); del2 = del_r2*180./pi;...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
WATERMODEL returns a vector of length 825, but the length of initial conditions vector is 3. The vector returned by WATERMODEL and the initial conditions vector must have the
% Load file with variables temperature, ET etc, %% data=readtable("https://de.mathworks.com/matlabcentral/answers/uploaded_fil...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
can any one tell me why this error has occurred.
i is a vector (at least when the loop index LL is 2, for LL = 1 i is taken as the imaginary unit because it's not yet defined), ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I use fzero on these two functions?
Use the original equation. Why do you take log on both sides - it only implies problems for x <= 3/4. f = @(x)4*x-3-exp(-0.1*x)...

fast 4 Jahre vor | 0

Beantwortet
how do i get the the fifth and fourth number form behind?
x = [2361273621, 2937812378, 2367823827]; b = arrayfun(@(a)num2str(a),x,'uni',0); b = arrayfun(@(i)b{i}(end-4:end-3),1:length(...

fast 4 Jahre vor | 0

Beantwortet
Plotting using MATLAB problem
https://www.youtube.com/watch?v=GrpDgOjR5ZA

fast 4 Jahre vor | 0

Beantwortet
How can i put a stopping criterion for this bisection method code in matlab?
f_x= @(x)sin(5*x)+cos(2*x); p_old = 0; % give an initial value to it x_l =2; x_u = 10; x=x_l:0.01:x_u; hold on plot(x,f...

fast 4 Jahre vor | 0

Beantwortet
Is there any mathematical method of curve fitting for cases when the modeling function is unknown (another degree of freedom for the form of the function)?
No, there is no such method. Often, physical considerations are a way to decide for a suitable model function. If this is not ...

fast 4 Jahre vor | 0

Beantwortet
How to generate a random number that is either 100, 200, or 300.
Hint: 100*1 = 100 100*2 = 200 100*3 = 300

fast 4 Jahre vor | 0

Beantwortet
writing the equation of normalize correlation
rng('default') x = 4; y = 5; w = rand(x,y); wstroke = rand(x,y); NC = sum(w.*wstroke,'all')/sum(w.^2,'all')

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Nonlinear optimization not working
fun = @(x,y,z) 25*x + 37*y + 48*z; x0 = [0,0,0]; A = [0 -1 2]; b = [0]; Aeq = []; beq = []; lb = [200 200 200]; ub = [...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Getting NaN greater values in a function
warning('off') iterations = [10, 100, 1000]; count = 1; p = 0.5; for n = iterations figure(); hold on; for ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to solve 2nd order multiple variable equation with ode45
syms t y1(t) y2(t) syms c2 m1 m2 k1 k2 F eqn1 = diff(y1,t,2) + c2/m1*(diff(y1,t)-diff(y2,t))+k1/m1*y1+k2/m1*(y1-y2)-F == 0; e...

fast 4 Jahre vor | 0

Beantwortet
The plot of a given equation
h=0:0.01:2; Fmax = 37509.41*sqrt(h); plot(h,Fmax)

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to split a 4x3 matrix in half
If the number of columns of arr1 is divisible by 2: arr1 = [1 2 3 4;5 6 7 8;9 10 11 12]; arr1_half = arr1(:,1:size(arr1,2)/2)

fast 4 Jahre vor | 0

Beantwortet
how to write equation in matlab for E(t-tp) where the E is E(t) but introduce a tp delay time.
You will need to make a change in the unit of time in your equations such that the delay time is in the order of 1 - it's not p...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Provide Jacobian matrix to ode15i for solving DAE system
y0 = [1; 0; 0]; yp0 = [0; 0; 0]; options = odeset('RelTol',1e-4,'AbsTol',[1e-6 1e-10 1e-6], 'Jacobian', @Jac_robertsidae); [y...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Define a variable on a spline
n = 3; n1 = n-1; a = 20; b = 10; P = [0 b;0 0;a 0]; x = P(:,1); y = P(:,2); T ...

fast 4 Jahre vor | 1

Beantwortet
bisection method error symbolic
syms y q=20; g=9.8; b=3+y; ac=3*y+y^2/2; f= 1-q^2/(g*ac^3)*b; x1=0.5; xu=2.5; hold on fplot(f,[0.5 2.5]) grid on f =...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Bvp4c Unable to solve the collocation equations -- a singular Jacobian Encountered
clc; p = 0.01; Betaf = 207; Betas = 17; Beta = 0.5; kof = 0.613; kos = 400; m = 1; b2 = 0.5; b1 = 0.5; G1 = 5; G2 = 5...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Third for loop runs, second and third loops do not
If val_T were 1, only the third loop was entered. But we don't know the value of val_T.

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Using euler's method to plot x(t) graph
You pass "ICs(z)" and "timeVector" to "eulersub". In the function, they get the names a and b. But a and b are never referenced ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to solve this without syms x
fun = @(x) x.^2./(1+sqrt(x)) ; sol = fzero(@(x)fun(x)-2,10); x = 0:0.1:4; plot(x,fun(x),sol,fun(sol),'o')

fast 4 Jahre vor | 0

| akzeptiert

Mehr laden