Answered
Graph Not Plotting for the For Loop Code
H=linspace(0,40000,4001) rho=zeros(1,numel(H)) for i=1:numel(H) h = H(i); if h > 25000 T = -131.21 + h.*0.0...

4 years ago | 1

Answered
how can i wrote a geometric series
help cumsum ZZ_d = cumsum(position_d)

4 years ago | 0

| accepted

Answered
How can I create this Cumulative Normal (Gaussian) Psychometric Function?
pf = normcdf(x,alpha,beta)

4 years ago | 0

| accepted

Answered
Intercept of each line to y-line
a = f1.a; b = f1.b; xintercept1 = 1/b*log(1.5228/a); (Same for f2,f3,f4 and f5)

4 years ago | 0

| accepted

Answered
Error using Plot for Fourier Series
x = 0:0.01:4; N = 10; n = 1:N; for i=1:numel(x) f(i) = 0.5 + 2/pi*sum((-1).^(n-1).*cos((2*n-1)*pi*x(i)/2)./(2*n-1)); end...

4 years ago | 0

Answered
Why am I getting the not enough inputs error on line 63 when defining matrix (f=)?
function [th3,th4,th5,r5] = NR(~,~,th3guess,th4guess,th5guess,r2,r3,r4,r5guess) instead of function [th3,th4,th5,r5] = NR(~,~,...

4 years ago | 0

| accepted

Answered
Need to solve the non linear equation below using Matlab
Na = ...; Nd = ...; NC = ...; EC = ...; kbT = ...; EA = ...; NV = ...; EV = ...; ED = ...; EF = zeros(numel(Na),numel(N...

4 years ago | 0

Answered
for loop does not save the values in the respective array
%________________ %parĂ¡metros % Pc y Tc tomado de https://www.linde-gas.es/es/images/n-Butano_tcm316-612756.pdf % w tomado ...

4 years ago | 0

| accepted

Answered
Plotting an implicit solution obtained by differential equation in MATLAB
The solution to the differential equation with y(0) = 3 is only defined up to the point x where y' becomes Infinity.

4 years ago | 0

Answered
How can I generate codes including the all possible arrangements of 3 digits (0, 1, -1) like this codes
You forgot 0 0 0 :-) Try https://de.mathworks.com/matlabcentral/fileexchange/7147-permn for your problem.

4 years ago | 0

| accepted

Answered
combine 2 matrices to 1 matrix?
N = numel(A); C = zeros(2*N,1); C(1:2:end-1) = A; C(2:2:end) = B;

4 years ago | 1

| accepted

Answered
Alternative to add assumptions to vpasolve
I don't know if your system of equations has a solution, but you can enforce sum(w(i))=1 by replacing wi by wi/(w1+w2+w3+w4) (i...

4 years ago | 0

| accepted

Answered
Mutiply 2 matrix operations at the same time using a function
function [M1 M2] = MatMult(A,B,C) M1 = A*B; M2 = A*C; end

4 years ago | 0

Answered
Greetings to all, could you help me with this integral please
t = linspace(0.1,3,29); x = linspace(-3,3,60); [T,X] = meshgrid(t,x) for i = 1:numel(x) for j = 1:numel(t) f = ...

4 years ago | 1

| accepted

Answered
How do i fit a rotated ellipse to my data in MATLAB
Change your equation to that of a rotated ellipse, e.g. f = @(a) (((x-c(1))*cos(a(3))+(y-c(2))*sin(a(3)))/a(1)).^2 + (((x-c(1))...

4 years ago | 0

Answered
Restrain fsolve and fzero to return only postivie solutions
In fzero or fsolve, square the x vector with which you are asked to evaluate your equation: function res = fun(x) x = x.^2; ...

4 years ago | 0

Answered
for loop only gives me one value
You only set xi(1) in for i=1:nc xi(i)= z1./(1+alpha_g(i).*(ki_1(i)-1)); but refer to xi(1) up to xi(6) in the following...

4 years ago | 1

Answered
How would I create a row vector, knowing the first value, the increment and the number of entries?
frames = 0:0.82:(size(lms,3)-1)*0.82

4 years ago | 2

| accepted

Answered
Peng-Robinson 3 equations of state to find the number of moles
syms Vm F = ((R*T)/(Vm-b))-((a*alpha)/(Vm^2+2*b*Vm-b^2))-p == 0; Vmzero= double(solve(F)); Vmzero = Vmzero(abs(imag(Vmzero))<...

4 years ago | 0

Answered
Could you help me how Can I solve this integral?
Use "vpaintegral" instead of "int": syms x expr(x) = sin(x)/x*exp(-3*x^2+i*x); I = vpaintegral(expr,-10,10) or directly sy...

4 years ago | 1

| accepted

Answered
Poiseuille flow in Elliptical channel
r = linspace(0,1,20); phi= linspace(0,2*pi,36); [R,PHI] = meshgrid(r,phi); X=a*R.*cos(PHI); Y=b*R.*sin(PHI); V = -1/(2*mu)*...

4 years ago | 1

| accepted

Answered
How to change my spline code to natural spline?
One google search and so many hits, e.g. http://de.mathworks.com/matlabcentral/answers/387177-plot-natural-cubic-spline#answer_...

4 years ago | 0

Answered
How to Add Matrix as x0 Variable in fminsearch?
for i=1:number_of_estimates value_of_objective(i) = objective_function(X0(:,i)) end where X0 is the matrix in which the c...

4 years ago | 0

Answered
Elementwise division in matrix notation
Backslash \ , not divide /.

4 years ago | 0

| accepted

Answered
Help regarding solving equations
Change sin(a) to sind(a). Further Qi will never be exactly Qd. I suggest you print Qi-Qd over a and see if it intersects the a...

4 years ago | 0

| accepted

Answered
Need to use ode45 to solve a problem
This is a delay differential equation. You will have to use DDE23 instead of ode45.

4 years ago | 3

Answered
How to Compute All Combinations of Vectors of Length 6 Made up of Numbers -1 and 1?
Brute force would be unique(perms(A)) Maybe there is a better solution.

4 years ago | 0

| accepted

Answered
Look Up Table for position solver
Use fmincon (or maybe better ga, since the objective function doesn't look differentiable) to solve the following problem: min:...

4 years ago | 1

| accepted

Answered
Solving equation without syms
For the first equation: Build the polynomial of degree 3 in V with pencil and paper, give numerical values to S,V0,C and P and ...

4 years ago | 1

| accepted

Load more