Beantwortet
after runing this function, i only see the result of t{1}.. in the command window but not in the workplace so i can't use this value , does anyone know why?
Output T to the calling program - then it will appear in the workspace: D=[0 0 0 pi/2; 0 5 0 pi/6; 0 5 0 pi/2]; T = ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Integration of elements of a matrix
syms x x1 x2 x3 x4 x5 x6 F3w F4w F5w F3p F4p F5p assume([x x1 x2 x3 x4 x5 x6 F3w F4w F5w F3p F4p F5p],'real') L2=60000; L1=4...

fast 4 Jahre vor | 0

Beantwortet
Solving Heat equation using pdepe does not give credible results
m=1; xmesh=linspace(0,270E-6,270); tspan=linspace(0,2,50); sol=pdepe(m,@pdefun,@icfun,@bcfun,xmesh,tspan); u=sol(:,:,1); fi...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Points inside the sphere
Hint: Use the function fun = @(x,y,z) ((x-X)/a).^2 + ((y-Y)/b).^2 + ((z-Z)/c).^2 - 1.0;

fast 4 Jahre vor | 1

Beantwortet
solving a system of equations
M1=3 P1=101325 %pa or 1 atm theta2 = .349 %rad or 20 degrees theta3 =.262 %rad or 15 degrees %first get P2 and P3 %area 2 ...

fast 4 Jahre vor | 0

Beantwortet
How can I plot two functions in the same graph?
fplot(@cosh) hold on p = @(x)0.6671*x.^3-1.7921*x.^2+2.7580*x-0.089; fplot(p) hold off

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Iterating an equation through a range of values to satisfy a condition
count = 0; for X = 11:15 % Needs to be a range of values from 11 to 15 count = count + 1; X_array(count) = X; ...

fast 4 Jahre vor | 0

Beantwortet
Question on DDE23
lags=1; tspan=[0 10]; sol = dde23(@ddefunc,lags,[0.8; 0.2],tspan); plot(sol.x,sol.y(1,:)) function yp = ddefunc(~,y,Z) ...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
solving 1D parabolic-elliptic equations with one initial condition
Supply an arbitrary initial condition for the elliptic pde - if possible one that satisfies its boundary conditions. If pdepe a...

fast 4 Jahre vor | 0

Beantwortet
How to solve multiple equation and get all value of the variable?
p1 can be chosen arbitrarily since the corresponding column in the matrix A is zero. (I set p1 = 1). Note that sol does not sa...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can i plot this function? y=0.75/(log10(x)*2).^2
What do you mean by "in 2D" ? It is a simple function to be plotted y vs. x: x = 2:0.01:5; y = 0.75./(log10(x)*2).^2; plot(x,...

fast 4 Jahre vor | 0

Beantwortet
Mean distance function upgrade question
Don't know if you have enough RAM for this. Note that the distance matrix pdist2(group1,group2) will be 70000 x 80000 in your ca...

fast 4 Jahre vor | 1

Beantwortet
How would I use the 'count' function but to only count instances of both columns being specified?
x_y_= [1 4; 5 3;9 8; 2 7;1 8;7 2; 2 7;1 5;4 3]; n = nnz(ismember(x_y_,[2,7],'rows'))

fast 4 Jahre vor | 0

Beantwortet
how can I use my function f to replace a and b with writing all the equation every time? x^3 + a^2*x^2 - 10)*sin(x) - y) like f(a)*f(b)<0
x = 13.61015; y = 13257; a = 5.14; b = 11.47; err1 = 0.000001; f = @(x,y,p) (x^3 + p^2*x^2 - 10)*sin(x) - y ; f(x,y,a) f(...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why is "fitoptions" returning the error "Too many input arguments"?
fitoptions is part of fittype, not vice versa as you try to do. Thus fitoptions must be define before fittype: options = fitopt...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
I'm trying to solve two non-linear equations using fsolve
Variables and residuals must be put into one single vector: [x,fx] = fsolve(@fun,[6;6]) % Set up the functions that will sto...

fast 4 Jahre vor | 0

Beantwortet
Cannot understanding the dimension of XY1
omega_n = 10; omega = 0:0.1:20; zeta1 = 1.0; r = omega./omega_n; XY1 = sqrt((1+(2*zeta1*r).^2)./((1-r.^2).^2+(2*zeta1*r).^2)...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Solving system of transient pdes in 2D space method of lines
Nobody uses ode45 for a system of ODEs that stems from the discretization of a reaction-diffusion PDE. You must use a stiff sol...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I get x-y values for a given z coordinate from a 3d surface plot?
If you can get a z-value from (x,y) coordinates by a certain function f, you can get the x-y-coordinates by using an optimizer t...

fast 4 Jahre vor | 0

Beantwortet
How to solve this equation
Use pencil and paper. dy/dt = -(1+2*n)*y -> dy/y = -(1+2*n)*dt -> log(y/y0) = -(1+2*n)*(t-t0) -> y = ?

fast 4 Jahre vor | 2

Beantwortet
Unable to find explicit solution
syms d L R x y phi theta assume (L,'positive') eq(1) = -L*cos(theta) + x == 0; eq(2) = -L*sin(theta) - L/2 + y == 0; eq(3) =...

fast 4 Jahre vor | 0

Beantwortet
How to solve a function with uknown parameter with bisection method
syms x y p eqn = y - (x^3 + p^2*x^2 - 10)*sin(x) == 0; eqn = subs(eqn,[x y],[13.61015,13257]); p = vpasolve(eqn,p); p = p(p>...

fast 4 Jahre vor | 0

Beantwortet
Lateral Deviation Between two curves
The normal to "driven_path" and the "desired_path" do not cross for r(4) < x < r(2). That's why there is a gap in the distance g...

fast 4 Jahre vor | 0

Beantwortet
Use element as indices to continue calculation
data = readmatrix("https://de.mathworks.com/matlabcentral/answers/uploaded_files/1172778/data.csv"); ind=[1,764,1335,1459,2151]...

fast 4 Jahre vor | 0

Beantwortet
Simplifying the algebraic equation
No.

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Lateral Deviation Between two curves
desired_path_invers = @(y)sqrt(y-10); true_path_invers = @(y)sqrt(2*y); y = 10:0.1:12000; plot(y,abs(desired_path_invers(y)-t...

fast 4 Jahre vor | 0

Beantwortet
how to make a matrix only showing Permutation without order ?
You mean nchoosek([1:20,25],3) nchoosek(21,3) not 21^3 ?

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
solving an equation not by sym
Linear system of equations in E(1,1),...,E(n+1) and 2/x. Setup for n = 4 (solution variables are E(1,1),E(2,1),E(3,1), E(4,1), ...

fast 4 Jahre vor | 0

Beantwortet
Comparing each corresponding element of a matrix from multiple vectors
A = [1 2 ; 4 5]; B = [-1 3; 7 -4]; C = [-20 4; 3 -1]; arr = cat(3,A,B,C); max(arr,[],3)

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Index exceeds the number of array elements. Index must not exceed 2.
F1 and F2 are scalar values if you define them as you do in your code. Thus F1(x(n)), F2(x(n-1)) makes no sense. Further x(n) a...

fast 4 Jahre vor | 0

Mehr laden