Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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)...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 1

Respondida
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 ...

casi 4 años hace | 0

| aceptada

Respondida
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(:,...

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
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.^...

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 2

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

casi 4 años hace | 0

| aceptada

Respondida
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)...

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

Respondida
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=...

casi 4 años hace | 0

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

casi 4 años hace | 0

| aceptada

Respondida
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 ...

casi 4 años hace | 1

Respondida
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...

casi 4 años hace | 0

Respondida
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 ...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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:...

casi 4 años hace | 0

| aceptada

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

casi 4 años hace | 0

Respondida
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...

casi 4 años hace | 0

| aceptada

Respondida
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...

casi 4 años hace | 1

| aceptada

Respondida
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...

casi 4 años hace | 0

Respondida
Trying to store data
fores(i,:)= "fores" has three dimension, thus fores(i,i,:) ? I don't know where you want to save what and if the dimensions fit...

casi 4 años hace | 0

Cargar más