Answered
Is there an easier way to index diagonal elements of a matrix?
A = diag(randi(100,10,1)); n = size(A,1); A(sub2ind([n,n],[3 6 7 9],[3 6 7 9])) = 1000; A If you understand how matrix ele...

4 years ago | 2

| accepted

Answered
Symbolic solve with user-specified precision
Your belief has preciously little value. Faith in mathematics tends to be a waste of mental energy. Let me expand your equations...

4 years ago | 0

Answered
I created an array of size 255 of pseudo-random integers . I want to access the value at a particular index of the array how can I do it ?
Basically, you need to look at the getting started tutorials. Try the MATLAB Onramp. r0 = uint8(randi(255,255,1)); r0(158)

4 years ago | 0

| accepted

Answered
Is it possible to (non-linear) minimize x^y by choosing both x and y?
Can MATLAB solve it? Yes. Your doubt is only you not knowing how to solve the problem. In fact, simplest is to transform the pr...

4 years ago | 0

| accepted

Answered
isprime function seems to have poor performance
As a follow-up, I've also compared the MATLAB isprime to that of Python and Mathematica. On significanty large numbers, The MATL...

4 years ago | 2

Answered
Where to get a zip code for free 30 days trial
This is not a question about MATLAB. However, the answer is easy. CONTACT sales/customer service. Just contact the MathWorks dir...

4 years ago | 1

Answered
Is it possible to generate an encrypted function that can be used a limited number of times?
Is it possible? It depends on how good or technically naive are your users. How determined would they be? You can "encrypt" a f...

4 years ago | 1

Answered
Optimization - find a max on a complicated function
You maximize a function using a tool that minimizes it, by finding the minimum of -f(x). How to do it? Use fminbnd. Set the bou...

4 years ago | 1

Answered
finding the orthogonal vectors for a series of vectors
I think you are confused. Really, this is not a difficult problem. You need to understand the linear algebra of it, or you will ...

4 years ago | 3

Answered
How to select columns in a matrix whose first row data is positive?
Easy peasy. A=[-1 2 5 4 -4;1 2 3 4 6] B = A(:,A(1,:) > 0)

4 years ago | 0

| accepted

Answered
How can I use the ( nchoosek ) for this case nchoosek(x,y) where x=[1:1:80] , and y=64;
As Jan pointed out, you CANNOT solve your problem in this way. Using nchoosek in this form, it almost always is a form of brute ...

4 years ago | 0

Answered
How can i solve this differential equation by the method of finite difference approche?
Answers is not a service where we do your homework assignments. However, you have now gotten an answer, so I'll point out that y...

4 years ago | 0

Answered
Decimal and very small values returning zeros
Um, why are you doing this numerically at all??????? With the variable of integration as c, your kernel is: (pi*t)^(-1/2).*...

4 years ago | 0

Answered
least square fitting for a nonlinear regression.
You show no data, and only a difficult to understand equation, but I am pretty sure what form you are trying to fit. y(t) ...

4 years ago | 0

Answered
How to solve a system of equations?
pt1, pt2, and pt3 are the equations of the surfaces of three spheres, each wih the same fixed, but unspecified radius. Pick an...

4 years ago | 0

Answered
How to optimize parameters with dsolve?
You cannot do so. The solution using dsolve has MANY parameters in it that have no assigned value. As far as the use of dsolv...

4 years ago | 0

Answered
How to convert decimal time to HH:MM:SS
format long g T = now % so the current time in a decimal format The integer part of that time represents days, and above. The ...

4 years ago | 0

Answered
Integration Help in exponential
Did you try it? Why not make an effort? Surely you can do something. syms t T K(t) = exp(-t^1.3/27.290)*exp(-t/12.724)*t^0.3 ...

4 years ago | 0

Answered
How to find the factorial of fractional numbers using matlab code?
You CANNOT compute the factorial of a fractional number. Factorials are defined only for integers. HOWEVER... It is true that...

4 years ago | 2

| accepted

Answered
If your MATLAB licence expires, can you still use datasets created on MATLAB prior to expiration (and saved in non-MATLAB format e.g. Excel) for future research papers?
Unequivocably, yes you can do so. There is no problem with use of such data after your license will expire.

4 years ago | 0

Answered
Fmincon converged to an infeasible point, I don't know why
I'm sorry, but this code is a bit strange. Ok, wildly strange. Why are you using fmincon? You have no linear inequality constra...

4 years ago | 0

| accepted

Answered
Should I use EIG or SVD to compute the eigenvalues of a symmetric matrix?
Again, these are just my thoughts as I write them down. I'll possibly fail to get everything answered in here. Such is life. Wh...

4 years ago | 0

Question


Should I use EIG or SVD to compute the eigenvalues of a symmetric matrix?
I saw ths question posed as an answer to another question. So I'll pose the question myself, then post my own thoughts as my ans...

4 years ago | 2 answers | 0

2

answers

Answered
Mathlab code for euler equation
What is your question? Let me guess, why does my incorrect code not work? Note, I edited your code to make it readable. Having ...

4 years ago | 1

Answered
Laserbeam reflection points/ path lengths
Why do you need a toolbox? Start with a ray. A line is simply defined by the equation: R(t) = R0 + R*t where R0 is a point...

4 years ago | 0

Answered
Ploting Intersection point of three circles
Why are you certain that forms the "intersection" point of the three circles? In fact, as the plot shows, there is no point wher...

4 years ago | 1

| accepted

Answered
How to check and remove outliers when it is Non-normal distribution
z-scores are not a terrible approach. HOWEVER, if you have many outliers, then they will themselves bias the z-scores, making ou...

4 years ago | 1

Answered
filling area enclosed by multiple curves
No problem (as long as you use a more capable tool), although it appears you have duplicate points. X = load('dataX.txt'); Y =...

4 years ago | 0

| accepted

Answered
Find minors of a rectangular matrix
https://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer Sadly, it ...

4 years ago | 1

Answered
finverse for function handle
Does every possible function you write down need to have a functional inverse? Of course not. In fact, it can be proven that fun...

4 years ago | 1

| accepted

Load more