solve efficiently sparse large linear system of equations
The fact is, a 3kx3k system is not that slow to solve. So unless you are doing this solve many thousands of times, keeping it sp...

19 days ago | 0

Matlab envelope function help
Seems pretty easy. Read the help, and look at the examples. Envelope is part of the signal processing toolbox. t = linspace(0,5...

21 days ago | 0

| accepted

Solving equations for Variable/Variable
No reason you cannot do this: syms A B C D E eqn = (A*B*C)/E == D; syms CoverD solve(subs(eqn,C,CoverD*D),CoverD)

22 days ago | 0

| accepted

Am I to understand that every function in matlab should be its own file?
Like SOME languages. Perhaps the ones you know. But certainly not all other languages. In general, yes, it is not unreasonable ...

22 days ago | 1

Find Image SVD without using SVD command
Too late for an answer to the question posed, but since the question is getting comments asking for more help, I'll post an answ...

22 days ago | 1

How to find the closed form solution of the natural and forced response of 2sin(3t) - 4x with x(0) = 0
Why do you think it is not correct? Would dsolve lie? That dsolve code must be pretty darn tricky. In fact, you have not used d...

23 days ago | 1

| accepted

parallel computing in Genetic algorithm
Whenever I see someone say they need to use parallel computing to make their code run faster, I wonder if the real problem is th...

23 days ago | 0

Solving Linear equation using LU Factorization and COLAMD
First, making a 100x100 matrix sparse is silly. Flat out, silly. The amount of time needed to solve that system is tiny, even as...

24 days ago | 0

| accepted

How do i write the function for the taylor polynomial of cos(x) using for loops and no anonymous function
We can see how well it works. Your code is below. Now, let me test it out, in a symbolic form. syms X P8 = taylor_cos(X,4) I...

25 days ago | 1

FAQ: Why is 0.3 - 0.2 - 0.1 not equal to zero?
Let me add my take on the problem. Suppose we try to represent these numbers in a binary form? That is, represent 1/10 = 0.1 i...

27 days ago | 0

How to divide the interval of any distribution in N equal parts based on its area?
As long as you have the cumulative distribution, and most importantly, an inverse for the cumulative, this is all you need. For ...

27 days ago | 0

| accepted

Curve fitting to atan function not working
phi_A=[-3.228;1.574;-0.8063;0.02548;1.904;2.87;1.853;-1.824;3.929]; phi_B=[-3.259;-1.466;-3.859;-3.035;-1.18;2.857;1.851;-1.811...

28 days ago | 0

| accepted

Why doesn't my script work? It comes back with Error: File: equTriPrismSurfArea.m Line: 6 Column: 1 This statement is not inside any function.
READ THE CODE YOU WROTE. function [SA]=equTriPrismSurfArea(s,h) SA=((sqrt(3)/2)*(s^2))+(3*s*h); end s = [1 2 3 4 5]; ...

28 days ago | 0

| accepted

symbolic calculation for series
But you defined U as a double precision array! See the difference. V = zeros(5) Note that zeros(5) creates a 5x5 array. If you...

28 days ago | 1

What is a symbolic expression (syms) and how do I use this when doing differentiation in matlab?
No. You misunderstand what diff does, and why diff is used there. diff, when applied to a numeric vector, forms the difference ...

29 days ago | 0

How to plot a multivariable function with constraints
Can you solve for y, as a function of k, given the constraint? (YES.) If so, then do you really have a TWO variable problem? (N...

29 days ago | 1

How to remove outliers and smooth the complex signals?
Is it valid to work with the real and imaginary parts separately? Possibly, though you know the data better than we do. What cau...

1 month ago | 0

Why do I receive Index exceeds the number of array elements (1)?
You would be best served to learn to use the debugger. But I can see what happens. At the first iteration, i = 1. And all of yo...

1 month ago | 2

How to write following equation with "dsolve" command?
Oh well. My fault, as i saw this question posted just before I went to bed last night. No rest for the weary. :) But we can at l...

1 month ago | 1

how to evaluate integral for given input function ?
No, you don't want to fit a polynomial to that vector. Polynomials are just bad news for anything. After seeing the your pictur...

1 month ago | 1

| accepted

What determines computation speed in MatLab?
What determines computation speed? A huge number of things. Try running bench on your computer. It looks at a many computations...

1 month ago | 0

| accepted

Matrix 'if' statement
One thing that new users of MATLAB mistake, is they want an if statement to apply to every element of a matrix or vector. For e...

1 month ago | 1

Plot with varying variable in optimization
You want to vary q, and for every value of q, get a corresponding value for K? w=2; y=10 q=0.5:1.5 % here q is the varing var...

1 month ago | 0

| accepted

Non-linear system of inequalities
Start with, what can we do in symbolic form? syms S G real Eq(1) = G > 21; Eq(2) = S >= 15; Eq(3) = S <= 18; Eq(4) = 61 <...

1 month ago | 1

| accepted

How do I find If one polygon is inside another?
There is a simple solution. It involves two tests, both of which are essentially vectorized. In fact, now that I think of it, th...

1 month ago | 0

How to display the nth term where the nth term is found by adding x number previous term?
Admit it. This is homework, since nobody would ask you to do this if it were not. And since it is homework, NOBODY should write ...

1 month ago | 0

Integrating discrete values to determine the absolute value of displacement
Find any consecutive pair of points that change the sign of their velocity. Between such a pair, use (linear) interpolation to ...

1 month ago | 1

| accepted

I want to loop an equation over multiple rows
Your problem is you want to write this as if you are still using Excel. MATLAB is not a spreadsheet, but you are still thinking ...

1 month ago | 0

| accepted

Intersection of Parametric Curves Using vpasolve
Your probem is when you zoomed in. The mathematics seems fine. >> tn tn = 11.4745470305524 >> un un = ...

1 month ago | 1

| accepted