Answered

Laguerre polynomials of large degree.

If you are using double precision, then OF COURSE high order polynomials of any form in MATLAB should not be trusted!!!! At leas...

Laguerre polynomials of large degree.

If you are using double precision, then OF COURSE high order polynomials of any form in MATLAB should not be trusted!!!! At leas...

18 days ago | 1

Answered

Shifting an array without circshift

Nobody can know what you did wrong. circshift DOES work. I'm not even sure what you would have done that would cause an error. T...

Shifting an array without circshift

Nobody can know what you did wrong. circshift DOES work. I'm not even sure what you would have done that would cause an error. T...

18 days ago | 0

Answered

trying to solve two non-linear simultaneous equations but I had an error figuring out my two unknowns (X(1) &x(2)) , can anyone pls help?

ARGH. Why would you post a picture of your code? And at that, only a partial picture? Even if I try to show why your code fails,...

trying to solve two non-linear simultaneous equations but I had an error figuring out my two unknowns (X(1) &x(2)) , can anyone pls help?

ARGH. Why would you post a picture of your code? And at that, only a partial picture? Even if I try to show why your code fails,...

20 days ago | 0

Answered

How to determine concavity point?

You give no data, so I'll need to make some up for an example. x = linspace(-30,30,500); y = cumsum((atan(x - 10)/2 + 1)); pl...

How to determine concavity point?

You give no data, so I'll need to make some up for an example. x = linspace(-30,30,500); y = cumsum((atan(x - 10)/2 + 1)); pl...

21 days ago | 0

| accepted

Answered

What to be chosen c so that all elements of matrix B will be a round number. B=A.c; where A is the matrix of non integers.

You want to find some scalar value c, such that for some given vector A, you want the product A*c = B to be purely a vecto...

What to be chosen c so that all elements of matrix B will be a round number. B=A.c; where A is the matrix of non integers.

You want to find some scalar value c, such that for some given vector A, you want the product A*c = B to be purely a vecto...

25 days ago | 2

Answered

How can i simulate a generic poisson process?

Not sure how you built the vector. Is it a Poisson process? Could be. :) As I recall, if you have exponential inter-rarrival tim...

How can i simulate a generic poisson process?

Not sure how you built the vector. Is it a Poisson process? Could be. :) As I recall, if you have exponential inter-rarrival tim...

25 days ago | 1

| accepted

Answered

mvncdf gives different results before and after the variable is standardised

No answer yet? The distinction as I see it is a subtle one. And had your covariance matrix been a diagonal one, then I expect it...

mvncdf gives different results before and after the variable is standardised

No answer yet? The distinction as I see it is a subtle one. And had your covariance matrix been a diagonal one, then I expect it...

25 days ago | 0

| accepted

Answered

Delete a plane (2d) within a 3d matrix

Sometimes it is simpler to take what you want, than it is to delete what you don't want. Here is a matrix: A = rand(256,256,256...

Delete a plane (2d) within a 3d matrix

Sometimes it is simpler to take what you want, than it is to delete what you don't want. Here is a matrix: A = rand(256,256,256...

26 days ago | 0

| accepted

Answered

How do I find the (right) null space of a matrix?

Easy. A = rand(5,2)*rand(2,3) A has rank 2. Arnull = null(A) A*Arnull It kills A, which is what the right nullspace would d...

How do I find the (right) null space of a matrix?

Easy. A = rand(5,2)*rand(2,3) A has rank 2. Arnull = null(A) A*Arnull It kills A, which is what the right nullspace would d...

27 days ago | 0

Answered

asking for a polynomial expression in an input

Can you type in a polynomial? Why not? You type it anyway. Just use input, which can return the result as a string. Or, use a di...

asking for a polynomial expression in an input

Can you type in a polynomial? Why not? You type it anyway. Just use input, which can return the result as a string. Or, use a di...

27 days ago | 0

Answered

How do i keep track of eigenvalue on pzmap for a pariticular system matrix A containing a variable D?

You can use the tool I wrote, eigenshuffle. It sorts the eigenvalues in as consistent an order as possible, by assuming the corr...

How do i keep track of eigenvalue on pzmap for a pariticular system matrix A containing a variable D?

You can use the tool I wrote, eigenshuffle. It sorts the eigenvalues in as consistent an order as possible, by assuming the corr...

28 days ago | 0

Answered

Error using "*" in my equation, assumes I am trying to do matrix multiplication.

Even though you are not using matrices, does not mean that linear algebra could not be intended. MATLAB does not know what you a...

Error using "*" in my equation, assumes I am trying to do matrix multiplication.

Even though you are not using matrices, does not mean that linear algebra could not be intended. MATLAB does not know what you a...

29 days ago | 0

| accepted

Answered

Finding the turning points

If all you will use are the 100 coarsely sampled points you are plotting, then min and max will do what you want. Look at the se...

Finding the turning points

If all you will use are the 100 coarsely sampled points you are plotting, then min and max will do what you want. Look at the se...

29 days ago | 0

Answered

surface area of 3D surface

Would our doing your exam for you really help you? Seriously? If you need help that badly, then you should have been studying mo...

surface area of 3D surface

Would our doing your exam for you really help you? Seriously? If you need help that badly, then you should have been studying mo...

29 days ago | 0

Answered

How do I place a point anywhere along x axis (with range 100m) in a plot?

Highly confusing. Do you want to plot a single point? What y value? Maybe you want to do this? k = 53; plot(k,0,'ro') % A sing...

How do I place a point anywhere along x axis (with range 100m) in a plot?

Highly confusing. Do you want to plot a single point? What y value? Maybe you want to do this? k = 53; plot(k,0,'ro') % A sing...

29 days ago | 0

Answered

Cantor function in matlab

To be honest, I'd probably be lazy, and just use the simple algorithm found in wikipedia. https://en.wikipedia.org/wiki/Cantor_...

Cantor function in matlab

To be honest, I'd probably be lazy, and just use the simple algorithm found in wikipedia. https://en.wikipedia.org/wiki/Cantor_...

1 month ago | 1

Answered

Wrong answer for ODE

As is so often the case, a DIFFERENT answer is not always a WRONG answer. It may just look different. But different is not alway...

Wrong answer for ODE

As is so often the case, a DIFFERENT answer is not always a WRONG answer. It may just look different. But different is not alway...

1 month ago | 0

| accepted

Answered

function of two uniformly random variables

I think you need to learn how to write a function. You also seriously need to learn about the dotted operators. What you wrote f...

function of two uniformly random variables

I think you need to learn how to write a function. You also seriously need to learn about the dotted operators. What you wrote f...

1 month ago | 0

| accepted

Answered

Create a series of variables with names that include numbers

https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval The funny th...

Create a series of variables with names that include numbers

https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval The funny th...

1 month ago | 0

| accepted

Answered

Can we trace the qualification of person using matlab?

Huh? If I had to guess, you want to see if an algorithm exists to know the degree of skill a person has as a MATLAB coder, based...

Can we trace the qualification of person using matlab?

Huh? If I had to guess, you want to see if an algorithm exists to know the degree of skill a person has as a MATLAB coder, based...

1 month ago | 2

Answered

Non linear fit of y=f[x] where y can have multiple values for a single value of x

No. You cannot use polyfitn. It is designed to solve a SINGLE valued problem, but with 1 or more independent variables. You cann...

Non linear fit of y=f[x] where y can have multiple values for a single value of x

No. You cannot use polyfitn. It is designed to solve a SINGLE valued problem, but with 1 or more independent variables. You cann...

1 month ago | 0

| accepted

Answered

How to give a condition based on the following situation

Why does it matter? Just pick one of them. Or choose randomly between them. Or on odd numbered days, choose the first, on even n...

How to give a condition based on the following situation

Why does it matter? Just pick one of them. Or choose randomly between them. Or on odd numbered days, choose the first, on even n...

1 month ago | 0

| accepted

Answered

How to replace the non zero values of a matrix with another value?

A(A ~= 0) == 0.1; One line of code. That applies to ANY release of MATLAB. As far back as I have been using MATLAB, so only bac...

How to replace the non zero values of a matrix with another value?

A(A ~= 0) == 0.1; One line of code. That applies to ANY release of MATLAB. As far back as I have been using MATLAB, so only bac...

1 month ago | 0

| accepted

Answered

how to script rectangular function in MATLAB

Define what a rect function is, since I find it difficult to read your mind. I'll guess it might be a unit rectangular pulse of ...

how to script rectangular function in MATLAB

Define what a rect function is, since I find it difficult to read your mind. I'll guess it might be a unit rectangular pulse of ...

1 month ago | 0

Answered

How can I 3d interpolate a function f: R^3 --> R^3 ?

This is a common problem, at least in the world of color modeling as I worked for many years. You will want to build 3 interpola...

How can I 3d interpolate a function f: R^3 --> R^3 ?

This is a common problem, at least in the world of color modeling as I worked for many years. You will want to build 3 interpola...

1 month ago | 0

| accepted

Answered

Positive definite and LQR

R = 1; C = [0 0 1]; Q1 = 25*C'*C; N = zeros(3,1); matrix = [Q1 N;N' R]; The matrix Q1 has rank 1. You formed it from a vect...

Positive definite and LQR

R = 1; C = [0 0 1]; Q1 = 25*C'*C; N = zeros(3,1); matrix = [Q1 N;N' R]; The matrix Q1 has rank 1. You formed it from a vect...

1 month ago | 1

Answered

How do I simplify polynomial coefficients with symbolic variables to the least possible forms?

The simplest form in your eyes is not always what a computer sees as the simplest form. It may require factoring the polynomial ...

How do I simplify polynomial coefficients with symbolic variables to the least possible forms?

The simplest form in your eyes is not always what a computer sees as the simplest form. It may require factoring the polynomial ...

1 month ago | 0

Answered

Smoothing a distribution curve

The distributions you show are not at all unsmooth. And they don't look at all uncommon for problems of that kind. So I'm not su...

Smoothing a distribution curve

The distributions you show are not at all unsmooth. And they don't look at all uncommon for problems of that kind. So I'm not su...

1 month ago | 2

| accepted

Answered

how can i see the steps in ref and rref.

You can't really. But you could, sort of. For example, you could use the debugger, and trace through the code as it runs on your...

how can i see the steps in ref and rref.

You can't really. But you could, sort of. For example, you could use the debugger, and trace through the code as it runs on your...

1 month ago | 0

Answered

How to solve a singular matrix problem?

Probable user error. How can you solve it? Almost always with a FEM problem, a singularity arises when you have made a mistake....

How to solve a singular matrix problem?

Probable user error. How can you solve it? Almost always with a FEM problem, a singularity arises when you have made a mistake....

1 month ago | 0