Respondida
Creating a mxn matrix that is all zeros except for the middle row and middle column which are 1s
Clearly a homework assignment. But now long since past, and with multiple answers, most of which are not in one line. However, s...

más de 3 años hace | 1

Respondida
find the index number using bsxfun command
But why would you use bsxfun at all to do this? A = [12 13 15 1]; B = [1 2 12 15 10 13 11 14 3 4 5 6 7 8 9 16]; Use ismember ...

más de 3 años hace | 0

Respondida
How can I rearrange equations to general form?
syms x y z eqn1=x+y+5==-z Nothing stops you from doing it yourself. For example, I might do: eqn1 = eqn1 + z Or, you can ev...

más de 3 años hace | 0

Respondida
Inverse computation with a starting guess
It is often the case that someone THINKs they need a matrix inverse, yet they don't. And since you don't know if you can do this...

más de 3 años hace | 1

Respondida
Vectorization approach to find matching elements in a matrix.
The part of your code that is a serious problem is where you build the arrays by growing them at each step. This is a really bad...

más de 3 años hace | 0

| aceptada

Respondida
Please how can I calculate the values of this finite sum of numbers in fully sequential , I'm finding it difficult
Easy peasy. sumof4thpowers = @(N) nchoosek(N+1,5) + 11*nchoosek(N+2,5) + 11*nchoosek(N+3,5) + nchoosek(N+4,5); For example: s...

más de 3 años hace | 0

Respondida
optimization in smart energy management system.I have used MILP algorithm but i got infeasible solution no point satisfy the constraints.how could i sort out these issues.
No solution means exactly what it sounds like. NO solution. And for this class of problem, if it tells you that NO solution exis...

más de 3 años hace | 1

Respondida
How to find derivatives using the diff command
There are two versions of diff in MATLAB. One operates on numeric vectors and arrays. It simply subtracts each number from the o...

más de 3 años hace | 0

Respondida
Sum two matrices shifted by a non integer number?
There is no magic, whereby you can do things that take computational time, and do them instantly. What you want to do is implic...

más de 3 años hace | 0

Respondida
Falkner-Skan code
You write: tau = (mu/(2*delta_y))*(4*un,2-un,3) But what des that mean to you? Is the fragment (4*un,2-un,3) intended to be...

más de 3 años hace | 0

| aceptada

Respondida
sqrtm vs chol to produce draws the multivariate normal distribution
Don't bother. sqrtm also can have a similar problem, but you won't like what it does either! For example: A = rand(3,2); A = A...

más de 3 años hace | 1

| aceptada

Respondida
How to get tangent line from a point not on the curve
The curve is: syms x y x0 F(x) = 945.75*x.^0.1002; A line tangent to the curve at any spcific location x0 would be simple to ...

más de 3 años hace | 1

| aceptada

Respondida
Solving systems of trig equations
My gut says no symbolic solution will exist. But that does not mean my gut is accurate here. First, I would throw pencil and pap...

más de 3 años hace | 0

Respondida
Merging piecewise polynomial (pp) structures
Is there any method to "merge" two PP functions? Well, no. Should there be one? I've been using and writing splines tools for 40...

más de 3 años hace | 0

Respondida
Solve of implicity equations
alpha = 0.14; A = 3300; n = 0.01 ; b_2019 = 69100; rho = 0.02; uno_alpha_A = ((1-alpha)*A); dos_rho = (2+rho); uno_n = (1+n);...

más de 3 años hace | 0

Respondida
What am I doing wrong?
ex2d is a function. You call a function, even a function you wrote yourself, by passing in arguments. For example, when you use ...

más de 3 años hace | 0

Respondida
Why can't the index variable of a for loop be stored in a structure or other array?
Surely this is not a big problem? for ind = 1:10 status.ind = ind; % do Stuff end

más de 3 años hace | 0

Respondida
is there any way to get a 2nd order polynominal through 2 points(each end point)
You want to fit a 2nd degree polynomial through two points? Of course only a straight line would work there through two points, ...

más de 3 años hace | 1

Respondida
Is there an option to overwrite the old release when installing a new one?
I'll admit, I typically have 3 to 6 releases, and usually at the high end of that scale. They are useful to me in case I might w...

más de 3 años hace | 0

Respondida
Volume of retinal lesion
It seems clear. You have multiple slices. Compute the area of each slice. At that point, you could just sum the area of each sli...

más de 3 años hace | 1

Respondida
Plot complex signal with imaginary and complex
n = 2000; t = linspace(0,500,n); Signal = cos(t/10) + i*sin(t/10); % a simple signal, as a function of time. plot3(t,real(S...

más de 3 años hace | 0

Respondida
Simplex optimisation using fminsearch
You are still looking for help on this? There is ABSOLUTELY no need to use a simplex optimizer for this problem. NONE AT ALL. L...

más de 3 años hace | 0

Respondida
3rd order approximation solving for variable
x = (0.2:0.2:0.8); y = [.3168, .7404, 1.3736, 2.2692]; format long g p = polyfit(x,y,3) So, to within floating point trash...

más de 3 años hace | 0

| aceptada

Respondida
General variable creation question
Don't generate a zillion variables. Instead, learn to use arrays. Cell arrays, structs, multi-dimensional arrays. This will leav...

más de 3 años hace | 0

Respondida
How can I make a 3d plot with two equations and one variable?
By the way, there is NO reason to define f as symbolic, and then assign the number 0.0405 to f. f is now double preicsion. syms...

más de 3 años hace | 0

Respondida
Solving an equation gives me three possible answers. How can I reference only one of these answers?
syms v f eta; f=0.0394; f = 0.0394; eqnvel = (9.801-3.802*v)*v*eta==(((f*200*(pi/4)*0.1^2)/6.434)+((27*(pi/4)*0.1^2)/64.34))*...

más de 3 años hace | 1

| aceptada

Respondida
Expanded use of .* operator
R2016b No need for access. That is when it appeared. Before that, bsxfun was needed. bsxfun appeared in R2007a. Before that, w...

más de 3 años hace | 0

| aceptada

Respondida
Problem with convergence using newtons method
First, you CANNOT prove that Newton's method has quadratic convergence using any existing function, or any such piece of code. ...

más de 3 años hace | 0

Respondida
How to specify a domain of x and y values for a graph?
Did you read the help for fsurf? What does the second argument do? help fsurf syms x y f = y^2*(...

más de 3 años hace | 0

| aceptada

Respondida
I would like to plot the possible solutions (x, y, z) of the following equation system: dn^2=(x-xn)^2+(y-yn)^2+(z-zn)^2 where n=1 to 3 and dn, xn, yn, zn are known
You have 3 spheres, with known centers and radii. Expand those equations. Then subtract them from each other. So maybe Eq1-Eq2...

más de 3 años hace | 0

Cargar más