Answered
natural cubic spline interpolation matlab
PLEASE DO NOT SEND ME E-MAIL ASKING FOR HELP. I ask people not to do this. (Note that for those people who might decide to do so...

5 years ago | 0

Answered
How can I show only the data from variable?
Use semi-colons at the end of those lines where you do not want to see all the crapola dumped to the command window.

5 years ago | 0

Answered
New Variables & Name in loop
Don't do it. https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval...

5 years ago | 1

Answered
How to select last digit of numbers and put it into a matrix?
Well, since you did write a fair amount of code, homework or not is irrelevant. There are some issues with your code however. ...

5 years ago | 0

| accepted

Answered
Real solutions to polynomials
When you use solve, remember that first of all, it will be impossible to find algebraic solutions to a general polynomial of deg...

5 years ago | 0

Answered
Why in a function an output argument isn't saved to workspace?
Suppose you use ANY MATLAB function? How does it work? For example... x = 1:5; Suppose you want to compute the mean of that ve...

5 years ago | 1

| accepted

Answered
Hilbert Matrix in least squares polynomial regression
Is A really a hilbert matrix? LOOK CAREFULLY AT WHAT YOU WRITE!!!!!!!!! In fact, A is not even a valid 3x3 matrix. If you fail ...

5 years ago | 1

Answered
Find a value in a matrix
help max Look at the SECOND argument returned from max.

5 years ago | 0

Answered
How to find solution using VPASOLVE
You have 2 variables, with 4 equations. vpasolve is NOT a tool that attmepts to solve a problem APPROXIMATELY. You cannot use vp...

5 years ago | 0

Answered
how can I solve this problem..
Um, what do you expect? syms theta0 x=90; g=9.81; v0=30; y0=1.8; y=1; th = -y+tan(theta0)*x-g*x^2/(2*v0^2*cos(theta0)^2)+y0; ...

5 years ago | 0

Answered
How to find the row and column for a value within a matrix [c] nearest or equal to 700.
Easy. And there would be many ways to do it. c = rand(5,5)*1000 [~,ind] = min(abs(c(:) - 700)) [rowind,colind] = ind2sub(size...

5 years ago | 0

| accepted

Answered
function for addition 2^16 modulo
Your numbers are in BINARY form, and you want to add modulo 2^16. The simplest solution is to convert to a decimal integer. I'l...

5 years ago | 0

Answered
Numerically solve differential equation
This is just a parabolic PDE, assuming that Bi is a KNOWN constant. You just say it is constant. But you should be able to use ...

5 years ago | 0

Answered
3D best fit curve from x,y and z data points
You may think it is easy, if only you can find someone who has the magic touch. Sorry, but not so easy. If the curve is presum...

5 years ago | 1

Answered
HOW TO GET THE VALUES OF CONSTANTS
Please don't YELL! Next, NEVER define pi. pi already exists, and I hate to tell you, it ain't 3.14. That only happens in certai...

5 years ago | 0

Answered
Code help on Euler's method
What you need to understand is that Euler is a poor method to use. Easy to write, easy to understand. But is it good? NO. And th...

5 years ago | 2

| accepted

Answered
Can I change a 3-tensor into a matrix by indexing with a matrix?
A = randn(4,4,3) % Not very creative in making up numbers. So sue me. :) [~,I] = min(abs(A),[],3) What is I? For every combina...

5 years ago | 1

| accepted

Answered
Newton Raphson Method not solving
This answer is here just to add some information. I try to teach that one should always plot everything, then look at what they ...

5 years ago | 0

Answered
How do I fit along the curve.
Why would there be code written to do something completely strange? Well, perhaps I should not call it strange, but your idea of...

5 years ago | 0

Answered
Interpolation error for one column increasing and one column decreasing
This is impossible to answer, since what you show is clearly not what you have. The error that is given indicates the vector (x...

5 years ago | 1

Answered
How can I test a long function in Matlab?
Don't test your long function. Because you should be writing SHORT functions. Then you can test each piece, verify it works as d...

5 years ago | 0

Answered
Simple limit returning NaN: f(x) = exp(-1/x)
Think of it like this. For a limit to exist at x==0, it MUST have the same limit as x approaches 0 from above, as it does when x...

5 years ago | 1

| accepted

Answered
Continuity of a function in a interval
It may seem basic to you. However, that just means you need to understand computing and floating point arithmetic. Nope. In fac...

5 years ago | 1

Answered
How to stop MATLAB from opening every time I switch on my computer?
This is not MATLAB that is your problem, but your MAC, and what you apparently told it to do. :) You have MATLAB set as a start...

5 years ago | 0

Answered
understanding "<" operator line
In order to understand this, I'd STRONGLY recommend you do the MATLAB Onramp tutorials. Try some examples. Look at what happens!...

5 years ago | 0

| accepted

Answered
Logical indexing of table failing
No. You do NOT know it contains 0.35. In fact, MATLAB cannot represent 0.35 exactly in floating point arithmetic. This is for th...

5 years ago | 0

Answered
Summing using simspons rule for a given range
If I might suggest, your goal is actively a poor one. Why? Simpson's rule is a higher order rule. It tries to give you a higher...

5 years ago | 0

Answered
Successive over-relaxation of Laplace equation is converging to slightly wrong value. Floating-point error or code error?
To understand what is happening, you need to first understand what the equations represent! Is this effectively a partial diffe...

5 years ago | 0

Answered
How can I find the eigenvalues of an n-by-n matrix using For Loops?
Simpler than what Matt has suggested is to just use matrix multiplication, coupled with deflation. That is, can you find the LA...

5 years ago | 0

Answered
Linear approximation of data set's points.
Don't do it that way!!!!!!! You cannot achieve a continuous piecewise linear function that way. Instead, use a tool designed to ...

5 years ago | 1

Load more