답변 있음
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...

19일 전 | 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...

22일 전 | 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 ...

22일 전 | 0

| 수락됨

답변 있음
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...

23일 전 | 0

| 수락됨

답변 있음
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]; ...

23일 전 | 0

| 수락됨

답변 있음
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...

23일 전 | 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 ...

23일 전 | 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...

24일 전 | 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...

25일 전 | 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...

27일 전 | 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...

27일 전 | 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...

28일 전 | 1

| 수락됨

답변 있음
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...

28일 전 | 0

| 수락됨

답변 있음
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...

28일 전 | 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...

30일 전 | 0

| 수락됨

답변 있음
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달 전 | 1

| 수락됨

답변 있음
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달 전 | 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달 전 | 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달 전 | 1

| 수락됨

답변 있음
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달 전 | 0

| 수락됨

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

약 1달 전 | 1

| 수락됨

답변 있음
how can I solve this double integral?
Why does this look like homework? Why do you assume it has a finite solution? The integral over y is trivial. syms y phi K =...

약 1달 전 | 0

| 수락됨

답변 있음
How can I speed up vpasolve?
Seriously, it has no solution? Gosh, am I surprised. So what does this do? syms z thetaz a = 1; b = 2; theta0 = 0; eqn = (a...

약 1달 전 | 0

| 수락됨

답변 있음
What does a=[b(90:end) b(1:89)] represent ?
You very clearly need to spend some time with a MATLAB manual or tutorial. You are asking a basic question, that would be covere...

약 1달 전 | 0

답변 있음
Fit a transform to remove piecewise discontinuities
Honestly, I don't see the problem, at least if the discontinuity is as large as you show it. That will make it clear where the b...

약 1달 전 | 0

답변 있음
How to symbolically integrate f(T) = exp (E/(8.314*T) through integration by parts or with trapezoidal method?
It is simply not true that there is no UNIQUE solution. There is no EXACT, analytical solution that can be written in a simple a...

약 2달 전 | 0

| 수락됨

답변 있음
Is there anyway to Re-grid one dataset to another dataset resolution without interpolating??
What you are asking to do is arguably still "interpolation" of a sort. In fact, Walter''s use of nearest neighbor is quite reaso...

약 2달 전 | 0

답변 있음
cross multiplication of algebra expression denominators
syms x y a b k eq = y/a == k+x/b Symple enough. :) eq = expand(eq*a*b)

약 2달 전 | 0

| 수락됨

답변 있음
Optimal values dynamic programming and mathematical programming
The crystal ball is very foggy today. What does it matter what we think? We know nothing about what you actually did, if the cod...

약 2달 전 | 1

답변 있음
correlation of nonlinear variables
Correlation does not really make sense in respect to nonlinear variables. Depending on the values of the variables, they will be...

약 2달 전 | 0

더로드