Answered
How to convert image from Cartesian to polar coordinate?
https://de.mathworks.com/matlabcentral/fileexchange/98114-cartesian-to-polar-image-transform

3 years ago | 0

Answered
I have two circles. I need to find the equation of the point of intersection at a fixed distance from points moving on each circle.
syms t x y X3 = -7 + 6*cos(9*t); %x component of first circle Y3 = -9 + 6*sin(9*t); %y component of first circle r_3 = 20; ...

3 years ago | 0

| accepted

Answered
Index exceeds the number of array elements - water balance for euler loop
Replace for i=1:nt by for i=1:nt-1

3 years ago | 0

Answered
I get Error using zeros Size inputs must be integers when I change h to be 0.8 or larger. How can I fix that?
Better fix n instead of h: f = @(t,v) (-v*3*t)/(1+t)+2*(1+t)^3*exp(-t); a = 0; b = 15; n = 100; h = (b-a)/n; alpha =1; t=...

3 years ago | 0

Answered
How to generate matrix based on previous elements?
A= [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 ...

3 years ago | 0

| accepted

Answered
for loop to sum values
outDates = rand(52560,9); sums = zeros(144,1); for i=1:144 sums(i) = sum(outDates(i+(0:364)*144,6)) + sum(outDates(i+(0:3...

3 years ago | 0

Answered
Solution of a system of ODEs by means of bvp4c
Works if you start at r=1e-8 instead of r=0 (see above).

3 years ago | 0

Answered
omit rows of matrix based on a condition
B = [0.25 0 0; 0.5 -4.91 -4.9; 0.75 -4.94 -4.96; 1 -4.985 -5; 1.25 -5 -5; 1.5 -5 -5; 1.75 -5 -5]...

3 years ago | 0

Answered
How do I simplify this symbolic summation?
syms e(k) T_s n e(n) = symsum(T_s*e(k),k,[0 n]) result = simplify(e(n)-e(n-1)) % doesn't simplify result = simplify(e(20)-e...

3 years ago | 0

Answered
reverse lookup table from vector multiplikation with unknown vectors
No I got a matrix M, which is a product of two unknown vectors a and b. I want to estimate those to vectors. Sorry if i wrote i...

3 years ago | 0

Answered
Error using .* in Matlab R2014a?
Implicit expansion could be the reason. It was introduced Matlab Release 2016b. What are the sizes of "tau" and "foss_CH4_burde...

3 years ago | 0

| accepted

Answered
How to plot equal equation at with 2 variable at each side. hard to simplift
For each value of albedo, you get 4 values for y that satisfy -900.*(1-albedo)==332.5-(y.^4).*(5.3865*10^-8)-((y-294.15)./3)-((...

3 years ago | 0

Answered
Finding Unknown Parameters from Monod Equations
Works for me. t = [0 3 5 8 9.5 11.5 14 16 18 20 25 27]' ; x = [0.0904 0.1503 0.2407 0.3864 0.5201 0.6667 0.8159 0.9979 1.0673 ...

3 years ago | 0

Answered
Newton Law - Cooling of a Cake
syms T(t) Tm k eqn = diff(T,t)==k*(T-Tm) T = dsolve(eqn) vars = symvar(T); C1 = vars(1); T = subs(T,Tm,70) eqn1 = subs(T,t...

3 years ago | 1

| accepted

Answered
how to solve this equation in matlab??
A = [3 0 -2;-1 2 0]; b = [-4;3]; sol_inhomogen = A\b; sol_homogen = null(A); sol = @(lambda) sol_inhomogen + lambda*sol_homo...

3 years ago | 0

Answered
How can I calculate 5 lions in a row?
n = 1024; S = 0:(n-1); % 2^10 possible sequences of coin tosses. A = de2bi(S); A = [zeros(n,1),A,zeros(n,1)]; nn = 0; for i...

3 years ago | 0

| accepted

Answered
Runge kutta method (Variable Step)?
I don't know about the correctness of the code, but it claims to use adaptive time stepping: https://de.mathworks.com/matlabcen...

3 years ago | 0

| accepted

Answered
Problem of Symbolic function evaluation
u = sym('u',[2 1]); f = u.'*u result = subs(f,u,[1;2])

3 years ago | 0

| accepted

Answered
Why do I keep getting "no solution found" message?
Maybe a better code structure to debug the values "fsolve" gets from "sigmagap". You think that you know that "sigmagap" return...

3 years ago | 0

Answered
How can one calculate Differentiation of matrix array with time as first column and data as second column ?
B = [A(:,1),gradient(A(:,2))./gradient(A(:,1)); plot(B(:,1),B(:,2))

3 years ago | 0

Answered
How to select rows from an array?
B = [A(2,:);A(4,:);A(6,:)] or if you want the rows one by one: A2 = A(2,:); A4 = A(4,:); A6 = A(6,:);

3 years ago | 0

Answered
I get an error when I try to run my logistic regression.
theta is not initialized - thus the theta(i) at the right-hand side of the assignment theta(i) = theta(i) - (alpha/m) * sum(er...

3 years ago | 0

Answered
Curve fitting equation does not give the input z back
@Olaf Schipper Did you read that you have to use the normalized values for pA and T to evaluate mu(pA,T) ? f(x,y) = p00 + p10*...

3 years ago | 1

| accepted

Answered
calculate coefficients with linear regression
A = [ones(numel(xj),1),xj,xj.^2,exp(xj)]; b = yj; sol = A\b; a0 = sol(1) a1 = sol(2) a2 = sol(3) a3 = sol(4) where xj and...

3 years ago | 0

| accepted

Answered
How to set a RAM limit, so that if it gets passed, the simulation gets killed?
https://de.mathworks.com/matlabcentral/answers/34923-limiting-matlab-memory-usage

3 years ago | 0

Answered
L’Hospital’s rule
syms x a=x+2; b=x^2+3*x+2; c=a/b; limit(c,-2)

3 years ago | 1

| accepted

Answered
i want to solve a 297 linear equations with 298 unknown variables
My guess is that your equations are linear in the unknowns. If this is the case, try https://de.mathworks.com/help/symbolic/sym...

3 years ago | 0

Answered
Finding the sum to n of 1/2^n
format long n = 1:20; b = 1./2.^n; Sn = sum(b)

3 years ago | 0

Answered
Euler method with tabular inputs and multiple ODE's
The best way to refer to time-dependent data vectors in integration problems is to use "interp1". In your case above, e.g., de...

3 years ago | 1

Answered
How to use ODE4 to solve second order ODE
ode4 works with 1st order systems of ODEs. Yours is a 2nd order equation. Can you write your equation as a system of two first...

3 years ago | 0

Load more