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

Answered
Not enough input arguments for my ode15s solver
options = odeset('Mass',E); E is not defined. x0 = [0; x0b ; 0]; x0b is not defined. [tout,xout] = ode15s(prime,tspan,x0,opt...

3 years ago | 0

Answered
How can I build a objective function for a three phase induction motor?
Fobjt = sum((I1-I1est)./I1).^2+((eff-effest)./N1).^2+((fp-fpest)./fp).^2+((I0-I0est)./I0).^2,'All')

3 years ago | 0

| accepted

Answered
How to creat a loop to repeat the code with +1 to the input until the condition is met?
N=1728; sumcands = 0; while sumcands ~=4 N = N+1; b= [1:N^(1/3)]; c = nthroot(N-b.^(3),3); digits=10; ...

3 years ago | 0

| accepted

Answered
Combining elements from two arrays
A = [0.9572 0.1419 0.7922 0.4854 0.4218 0.9595 0.8003 0.9157 0.6557]; B = [0.8147 0.6324 0.95...

3 years ago | 0

| accepted

Answered
How to add "erf()" part to the ode solution?
syms x y(x) eqn = diff(y,x) - (-x+2+10*exp(-10*(x-1)^2)) == 0; cond = y(0)==1; sol = dsolve(eqn,cond) fplot(sol,[0 6])

3 years ago | 1

| accepted

Answered
How can I select specific rows from a matrix when those row numbers are identified by another matrix?
If the row numbers in Matrix2 are already sorted: Matrix3 = Matrix1(Matrix2,:) Else sort them first.

3 years ago | 0

| accepted

Answered
How to plot a math function with a vector
Then maybe T_j_scalar_t = @(t) integral(@(tau) P(tau) .* dZ_th(t - tau), 0, t); T_j = arrayfun(@(t)T_j_scalar_t(t), cooling_ti...

3 years ago | 1

| accepted

Load more