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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 1

| accepted

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

3 years ago | 0

| accepted

Answered
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

3 years ago | 1

| accepted

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

3 years ago | 2

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 1

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 1

| accepted

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

3 years ago | 0

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

3 years ago | 0

Answered
How would you make these for loops dynamically recursive?
Code available under https://de.mathworks.com/matlabcentral/fileexchange/7147-permn It's brute-force - thus caution: quite mem...

3 years ago | 0

Answered
Fitting a data with the best fit
Try "fit" with fitType gaussEqn = 'a*exp(-((x-b)/c)^2)+d' https://de.mathworks.com/help/curvefit/fit.html#d124e31956

3 years ago | 0

Answered
Different results using curve fitting app
Scale your problem: x = [262088, 323208, 390728, 464648, 544968, 631688]; y = [0.629, 0.64, 0.93, 0.972, 1.355, 1.56]; xscale...

3 years ago | 1

Answered
Obtain imaginary numbers in for loop but running code at each step on its own produces absolute numbers
diff = (1-(3.*((1-x(i)).^(2/3)))+(2.*(1-x(i)))) reac = (1-((1-x(i)).^(1/3))) instead of diff = (1-(3.*((1-x).^(2/3)))+(2.*(1-...

3 years ago | 0

Answered
Matlab plot not showing correct values
v(i)=0.1553567*(i.^6)-2.0416*(i.^5)+9.1837*(i.^4)-14.829*(i.^3)-1.3703*(i.^2)+32.821*(i)-1.3155 instead of v=0.1553567*(i.^6)-...

3 years ago | 0

Answered
how to plot a periodic function fro negative to positive?
T = pi; % period x = -10:0.1:10; % lets say your original function is y=2*x which repeated every T second, then y = 2*(mod(x-...

3 years ago | 1

| accepted

Load more