Question

Help for a function which works like triu function in matlab

we have seen the function triu(A,k) which extracts upper triangular part of A. But i have to write my own function with the head...

1 year ago | 1 answer | 0

Question

Triu function in matlab programming

Matlab has a function triu(A,k) which extracts upper triangular part of A.Write your own function with the header U = myTriu(A,k...

1 year ago | 0 answers | 0

Question

Plotting 3 graphs in the same figure

Write a programme to plot the function f(x)=xsin(pi(9x+1)) over the interval [−1, 1] using increments in x of (a) 0.2, (b) 0.1, ...

1 year ago | 1 answer | 0

Question

Error in a code which computes sqrt(a)

One of the methods to compute sqer (a) , a>0 is X(n+1) = (a + (X(n)*X(n-1))/(X(n)+X(n-1)), n = 1, 2, …, with X0=1 and X1=a (T...

1 year ago | 1 answer | 0

Question

algorithm for computing ? is due to Archimedes: how steps can be repeated

The following algorithm for computing ? is due to Archimedes: 1. Start with ? = 1 and ? = 6. 2. Replace ? by 2?. 3. Replace ?...

1 year ago | 1 answer | 0

Question

Write a function [sn, n] = mySumPi(tol), which outputs ?n and n for the smallest n such that |?n − pi| < tol

1 year ago | 1 answer | 0

Question

Explicit Euler integration. Plot x(t) and y(t)

I have this exercise: dx/dt = −x(1 − y), t0 = 0, x(t0) = 0.5, dy/dt = y(1 − x), t0 = 0, y(t0) = 2 These equations ...

1 year ago | 0 answers | 0

Question

improved Euler integration scheme (possible code error) in matlab

I have this ex: dx/dt = −x(1 − y), t0 = 0, x(t0) = 0.5, (3) dy/dt = y(1 − x), t0 = 0, y(t0) = 2 (4) These equations are als...

1 year ago | 1 answer | 0

Question

Matlab: a function y where y is the ?-th Chebyshev polynomial of the first kind evaluated at xy is the ?-th Chebyshev polynomial of the first kind evaluated at xy is the ?-th Chebyshev polynomial of the first k

Chebyshev polynomials of the first kind, ?n(?), are defined recursively as follows: ?0(?) = 1, ?1(?) = ?, and ??(?) = 2???−1(?) ...

1 year ago | 1 answer | 0