Answered
Find elements having a specific row and column numbers in a matrix
A = [ 85 45 15 28 11 4 59 79 81 87 32 94 10 85 90 79 64 62 93 2...

3 years ago | 0

| accepted

Answered
Plotting Sum of series: whats wrong with this code?
syms k K = 1:100; F = arrayfun(@(K)simplify(symsum((-1)^(k+1)/(0.5*k-0.25),k,1,K)),K) figure(1) hold on plot(K,double(F),'...

3 years ago | 3

Answered
Vectorizing a Large Function with a Command
See how you can use the below code for your purpose. The Runge-Kutta code is made to deal with systems of differential equation...

3 years ago | 0

| accepted

Answered
solve equation with symbolic variables
c0 = 53.6; Re = 102.5; % external radious of column D = 2*Re; cov = 20; Rc = Re - cov; fc0 = 10; ec0 = 0.00076+((0.626*fc0...

3 years ago | 0

Answered
Trapezoidal integration without built-in functions
f = @(x,y) exp((x-1.5).^2+y.^2); x = linspace(-1,1,300); y = (linspace(-1,1,40)).'; F = f(x,y); value_integral1 = trapz(y,tr...

3 years ago | 0

Answered
Plotting a result with 3 different variables
To plot, you will have to keep one parameter constant and plot "result" over the two remaining parameters. Ca = linspace(1,10,1...

3 years ago | 1

| accepted

Answered
How to solve nonlinear equation?
Write as xdot = y ydot = inv(M)*(F-c*y-K*x) and use ode45 to solve.

3 years ago | 0

Answered
Rotate 3-D Point Cloud Using Rigid Transformation
angle = 180; angle_rad = deg2rad(angle); rot_matrix = [ cos(angle_rad) -sin(angle_rad) 0 ; ... sin(ang...

3 years ago | 1

Answered
How to integrate a function inside a ssc ?
syms x f = 1/(0.05+0.015*exp(100*x)); int(f)

3 years ago | 0

Answered
How to solve system of ODEs with unknown initial value?
You have a boundary value problem. I suggest to solve it numerically using BVP4C. xmesh = linspace(0,3,100); solinit = bvpinit...

3 years ago | 0

| accepted

Answered
Ode solver, how to pass V=0:0.1:1 used in the differential equations
So V should grow linearily from 0 to 10 in the differential equation ? Then define it in @ff_corr as V = 10*t.

3 years ago | 0

Answered
I can't find my error in the FTCS method.
clc; clear; clear all; L=1-0; T=40; dx=0.02; dt=0.001; d=(dt)/(pi^2*dx^2); N=L/dx +1; M=T/dt +1; x=zeros(N,1); t=ze...

3 years ago | 1

Answered
Error and Warning solving equations.
%General Data Wo = 3584.74 * 9.8; Vm = 268.76/3.6; Rm = 680 * 10^3; rho = 1.225; l_tr = 6.71; Pmc = 958.98 * 10^3; Tmc =...

3 years ago | 0

Answered
Numerical integration "backwards" for ODE45
fun = @(t,y) y; tspan = [0 1]; y0 = 1; [Tf,Yf] = ode45(fun,tspan,y0); tspan = [1 0]; y0 = exp(1); [Tb,Yb] = ode45(fun,tspa...

3 years ago | 1

| accepted

Answered
How to integrate matrices in MATLAB ?
% Generate a data matrix fun = @(t,y,x) x.^2+y+sin(t); X = 0:0.1:1; Y = 1:0.05:2; T = 1:1:10; for it = 1:numel(T) for ...

3 years ago | 0

| accepted

Answered
Matrix equation as constraint
Here are the constraints to be put in Aeq and beq if you use "fmincon". n = 5; p = 3; A = sym('A',[n,p]); X = sym('X',[n,p])...

3 years ago | 1

| accepted

Answered
RK23 with given coefficients
Yes, it's unused in your equation. But you could generalize your code as to include it: u0 = 0.45; f = @eqns; f_exact = @(t...

3 years ago | 0

| accepted

Answered
The cutoff frequencies must be within the interval of (0,1).
You overwrite your prescribed fs by the call to "audioread": [y, fs] = audioread('Domini_Fil.wav'); % Load audio signal Check ...

3 years ago | 1

Answered
error "Inner matrix dimensiion must Agree"
GR = [5:5:25]; T = [0.2:0.2:1]; H = 1; n = 1; N = 5; Pr = 0.72; S = 0.2; for i = 1:numel(GR) Gr = GR(i); for j = 1:...

3 years ago | 0

Answered
How to add rows to the matrix
Like this ? A = [1 4 0 0 1 0 2 3 0 1 0 0 3 3 0 1 0 0 4 4 0 0 1 1 5 3 0 1 0 0 6 4 0 0 1 ...

3 years ago | 0

| accepted

Answered
How to plot u(t) - u(t-2) on matlab
u = rand(20,1); du = u(3:end) - u(1:end-2); plot(du)

3 years ago | 0

Answered
printing complete mathematical equation
I don't know exactly what you mean. syms M K X(t) %Physical Parameters dX = diff(X,t); L= M*dX^2/2+K*...

3 years ago | 0

Answered
Precision and indices must be positive integers
ouputpoint(1) = 0 (see above). So you try to access P(0) which is not possible in MATLAB since array indices start at 1, not a...

3 years ago | 0

Answered
printing complete mathematical equation
syms m(t) n(t) A(t) eqn = A==10*cos(m)+5*sin(n) deqn = diff(eqn,t)

3 years ago | 2

Answered
How to solve and plot system of nonlinear differential equations?
d=0.015; xp1=0.002; xp2=d-xp1; tspan = [0 0.17]; y0 = [xp2 - 0.00000001;0;0]; options = odeset('RelTol',1e-12,'AbsTol',1e-1...

3 years ago | 1

| accepted

Answered
i am not getting what is the problem with it
function good = find_good_hotels(hotels,ratings,cutoff) if ratings>=cutoff Ridx=find(ratings) good=hotels(Ridx) ...

3 years ago | 0

Answered
plot issue 'input function must return single or double value. sym found.'
a = 0.2; %field loss coefficient α[db/km] alfa = a*log(20)/20; gamma = 1.3; % fiber non-linearity coefficient γ[1/w...

3 years ago | 0

| accepted

Answered
9x3 linear (x,y,z must be positive)
A = rand(9,3); b = rand(9,1); sol = lsqnonneg(A,b) Now you can insert your data for A and b.

3 years ago | 0

| accepted

Answered
How to calculate double integral?
n = 1 ; t = 1; r = 1; s = 0:0.2:10; fun = @(x,z,k) x.^2.*exp(-2.*t.*x.^2)./(x.^2+1/r^2).^2 .* z.*exp(2*n*t.*z.^2).*besselj(0...

3 years ago | 0

| accepted

Answered
How to fit data in an array to a multidimensional function?
Generate four 1d column vector X,Y,Z and F of your data where F(i) is the value of your function corresponding to F(X(i),Y(i),Z(...

3 years ago | 1

| accepted

Load more