Beantwortet
fitlm - only positive coefficients
Use "lsqlin" instead. Here, you can set upper and lower bounds for the parameters.

fast 4 Jahre vor | 0

Beantwortet
ODEs with Structs in codes
What is the dimension of Tdata ? And what are your Tdata ? %%%input as an array of structs for fixed value variables input.v_z...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to divide a polynomial into two polynomials, one with the odd coefficients of w and the other with the even coefficients of w?
Odd part: (P(w) - P(-w))/2 Even part: (P(w) + P(-w))/2 syms w kd ki kp P(w) = 25*ki - w^4*(kd + 1) + w*(25*kp - 1)*1i + w...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I solve this?
syms PL c k eqn1 = PL * exp(-c*exp(-k*0)) == 179323; eqn2 = PL * exp(-c*exp(-k*10)) == 203302; eqn3 = PL * exp(-c*exp(-k*20)...

fast 4 Jahre vor | 0

Beantwortet
How to compare the complexity of two algirthms in MATLAB
Count the number of arithmetic operations used by both depending on the input. E.g. usual matrix multiplication needs m*n*o mul...

fast 4 Jahre vor | 1

Beantwortet
Computing a differential equation using a bessel function.
The solution y of this differential equation is a combination of J_0(x) and Y_0(x), the Bessel function of the first and second ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why is the Temperature curve looking like this at the end of the While loop?
tstart = 0; tend = 2.735; Tp0 = 293; dp0 = 40000*10^(-9); [T,Y] = ode15s(@fun,[tstart,tend],[Tp0;dp0]); mp = pi/6*1000*Y(:,...

fast 4 Jahre vor | 0

Beantwortet
Trying to plot summation based sine signal
syms x L = 2*pi; s = rand; si = L*s; G5_6 = gamma(5/6); G1_3 = gamma(1/3); k_di = 10000/35; C = (55/9)*(G5_6/(sqrt(pi)*G1...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Finding value of x given y in a model fit to normcdf
yValues = [0.3333 0.5000 0.8333 1.0000 1.0000 0.8571]; xValues = [1.4000 1.8000 2.2000 2.6000 3.0000...

fast 4 Jahre vor | 0

Beantwortet
perform polyfit on a semilogy plot
A = [ones(numel(t_discharge),1),t_discharge]; b = log10(Volt_discharge); x = A\b; semilogy(t_discharge,[Volt_discharge,10.^...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
convert expression to matrix
x = 0:0.001:10; y = 3*x+2+x.^5; plot(x,y)

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
compute the indefinite integral
f = 1010; z = @(d) sawtooth(2*pi*f*d+pi,0); dstart = 0.0; dend = 0.01; delta_d = 1e-5; d = dstart:delta_d:dend; intz = cum...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Storing output from inner for loop after every itteration of outer for loop in nested for loops.
a=zeros(1,2); for n=1:2 sum = 0.0; for m=1:2 sum = sum + cos(n*m); end a(n)=sum; end a

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
how do i calculate a 3d graph in this case?
pi and pp are vectors ; thus trying to access pi(i,j) and pp(i,j) will throw an error. Further, don't name a variable "pi" in o...

fast 4 Jahre vor | 2

Beantwortet
Binomial theorem coding algorithm
You mean syms a b p = (a+b)^10; expand(p) ?

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Trying to run a differentiation loop
clear all clc %%Ans1 syms X1 X2 X3 k t g x1 x2 x3 eqn1 = X1 + (k*t*X2) == x1; eqn2 = (g*((t-1)*(t*X1))) + ((1+ (g*k)*((t-1)...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
repeat each entry of a vector 100 times
A = reshape(repmat(A,100,1),1,500)

fast 4 Jahre vor | 0

Beantwortet
Error in interp2 (interpolation) command.
d1 = readmatrix("https://de.mathworks.com/matlabcentral/answers/uploaded_files/1165673/mydata.csv"); y=d1(:,3); x=d1(:,4); z=...

fast 4 Jahre vor | 0

Beantwortet
Tell the coding of this question...1
u = [-8 -14 25]/norm([-8 -14 25])

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Error in interp2 (interpolation) command.
Read about the requirements for input arguments x, y and z for interp2: https://de.mathworks.com/help/matlab/ref/interp2.html ...

fast 4 Jahre vor | 1

Beantwortet
Solving ODE in MATLAB with pre-defined steps
You can't choose the step size of ODE45 because the solver adapts the step size internally. You can only choose the output times...

fast 4 Jahre vor | 0

Beantwortet
Variable in function as well as integral boundary
Is it this what you want ? If not, please clarify how the theta in the integrand and in the upper bound of the integral should ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why is the Temperature curve looking like this at the end of the While loop?
For clarity, I suggest the following code: %%% DEFINITIONS %%% clear; Tb = 20+273; % temperature of the bulk air...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
plot(t,rx(:,6),'r:',t,y)
What does the (:,6) do to "rx" in this code? What is the 'r'? It looks like a name but it is not showing in the figure after...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to calculate write erf with real and imaginary part?
Are you sure the indefinite integral exists ? clc, clear all, close all D=1; n=0.003; r=1; s=-1:0.01:1; t1=10; for i = 1:...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I get just the x and y axis to show up?
axis on

fast 4 Jahre vor | 0

Beantwortet
how to find a plane perpendicular to a line?
[-126.3798+126.3818,-37.5517+37.5495,-539.5+531.5]*[x;y;z] = [-126.3798+126.3818,-37.5517+37.5495,-539.5+531.5]*[126.3818;37.549...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Implements a fractional order derivative per Caputo's definition
syms t f=sin(3*t+1); t0=0:0.01:5; dy=caputo(t0,f,0.3); plot(t0,dy) function dy=caputo(t0,f,gam) m=floor(gam); a=gam-m...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Error using horzcat. Dimensions of matrices being concatenated are not consistent while using integral2
fun=@(x,y) ... The x and y for which you must evaluate your function usually are matrices of the same size, not simple scalar v...

fast 4 Jahre vor | 0

Mehr laden