답변 있음

Why this function infinity loop

Because if your powers grow larger than 2^53-1 (i.e., flintmax), the number is no longer expressable exactly as an integer. All ...

Why this function infinity loop

Because if your powers grow larger than 2^53-1 (i.e., flintmax), the number is no longer expressable exactly as an integer. All ...

약 12시간 전 | 0

답변 있음

why ga does not respect upper bounds ?

Um, ub = [40 1e6 1e6 1e6 1e4 1e4 9000]; numel(ub) I can count, but I let MATLAB do it for me. As you should see, you posed o...

why ga does not respect upper bounds ?

Um, ub = [40 1e6 1e6 1e6 1e4 1e4 9000]; numel(ub) I can count, but I let MATLAB do it for me. As you should see, you posed o...

약 18시간 전 | 1

| 수락됨

답변 있음

i which library can i find those two functions (h-plane and e-plane) ?

There is NO such library, because those are not legal function names in MATLAB. A dash is not legal in a name, in a function OR ...

i which library can i find those two functions (h-plane and e-plane) ?

There is NO such library, because those are not legal function names in MATLAB. A dash is not legal in a name, in a function OR ...

1일 전 | 0

답변 있음

How to neatly or properly display the answers for simultaneous equations?

You may want to learn how to use the symbolic toolbox, which can display answers in a form you may want. A = [2 3 5; 3 4 7; 1 1...

How to neatly or properly display the answers for simultaneous equations?

You may want to learn how to use the symbolic toolbox, which can display answers in a form you may want. A = [2 3 5; 3 4 7; 1 1...

1일 전 | 0

| 수락됨

해결됨

Divisible by 2

This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

4일 전

답변 있음

First order derivative using Curve Fitter (smoothing spline fit)

For example, we might try using the same fit, on some data where I know the answer. x = rand(100,1)*2*pi; y = sin(x) + randn(s...

First order derivative using Curve Fitter (smoothing spline fit)

For example, we might try using the same fit, on some data where I know the answer. x = rand(100,1)*2*pi; y = sin(x) + randn(s...

4일 전 | 0

답변 있음

csv to .mat file

help csvread help save Perhaps you need to do the Onramp MATLAB tutorial?

csv to .mat file

help csvread help save Perhaps you need to do the Onramp MATLAB tutorial?

5일 전 | 1

답변 있음

Optimize function wich only admits scalar input

FIRST, NEVER return a variable that has the same name as your function. That is a dangerously, recursively incestuous operation ...

Optimize function wich only admits scalar input

FIRST, NEVER return a variable that has the same name as your function. That is a dangerously, recursively incestuous operation ...

6일 전 | 0

답변 있음

How to tell solver that symbols are matrices

A = sym('a',[2,2]) As you can see, A is a 2x2 matrix. B = rand(2,2); X = rand(2,2); Asol = solve(A*X == B,A) So now, for ...

How to tell solver that symbols are matrices

A = sym('a',[2,2]) As you can see, A is a 2x2 matrix. B = rand(2,2); X = rand(2,2); Asol = solve(A*X == B,A) So now, for ...

6일 전 | 0

답변 있음

How to simplify this symbolic equation - nominator and denominator manipulation

I never did understand why people worry about making a symbolic tool give a result in a mathematically identical form, that happ...

How to simplify this symbolic equation - nominator and denominator manipulation

I never did understand why people worry about making a symbolic tool give a result in a mathematically identical form, that happ...

7일 전 | 0

| 수락됨

답변 있음

Estimate area inside point cloud

As long as the curve is a sequence of points defining the perimeter and they are distinct, you can just compute the area using a...

Estimate area inside point cloud

As long as the curve is a sequence of points defining the perimeter and they are distinct, you can just compute the area using a...

7일 전 | 1

답변 있음

Graphing a polyfit function

DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! Do I need to say it ...

Graphing a polyfit function

DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! DON'T USE A HIGH ORDER POLYNOMIAL! Do I need to say it ...

7일 전 | 0

답변 있음

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...

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...

8일 전 | 0

답변 있음

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.

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.

11일 전 | 0

답변 있음

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...

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...

11일 전 | 1

답변 있음

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. ...

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. ...

12일 전 | 0

| 수락됨

답변 있음

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...

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...

14일 전 | 0

답변 있음

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...

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...

14일 전 | 0

| 수락됨

답변 있음

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 ...

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 ...

14일 전 | 1

답변 있음

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...

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...

17일 전 | 0

답변 있음

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; ...

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; ...

18일 전 | 0

답변 있음

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...

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...

18일 전 | 0

| 수락됨

답변 있음

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...

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...

19일 전 | 0

답변 있음

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 ...

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 ...

21일 전 | 0

답변 있음

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...

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...

21일 전 | 1

답변 있음

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...

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...

22일 전 | 0

답변 있음

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...

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...

24일 전 | 2

| 수락됨

답변 있음

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...

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...

24일 전 | 1

| 수락됨

답변 있음

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 ...

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 ...

25일 전 | 0