Answered
how to properly write this equation exp(x)cos(y)
An interesting, creative, yet terrible use of meshgrid. Instead, do this: [x,y] = meshgrid(-2*pi:0.5:2*pi,-1:0.5:1); Rea...

9 years ago | 0

Answered
How to generate 100000 random 2x2 matrices in matlab?
Surely you can generate a 2x2x100000 array? Surely you can use a loop to compute the condition number? Yes you could probably...

9 years ago | 0

Answered
normalize between -1 > x > 1 (not equal to -1 or 1)
You can't do this. Not effectively. Ok, let me say that you cannot do this well. Strict inequalities are not easily used when wo...

9 years ago | 1

| accepted

Answered
Orthogonal vector to this
Orthogonal to what? The result is a 2x100 complex valued array. Are you asking how to find a vector orthogonal to the rows of...

9 years ago | 1

| accepted

Answered
YALMIP constraint: Writing constraints for the first and last position
Don't. At least, don't write ANY constraints at all. Just minimize the function for y(2:N-1) and z(2:n-1). Inside your object...

9 years ago | 0

Answered
how to get not zero roots for equations equating to zero?
You are not looking to find the roots, but a non-zero solution to a singular linear system in a homogeneous problem. Well, that ...

9 years ago | 2

| accepted

Answered
how to solve ln(3) in matlab
There is NO ln function in MATLAB. This is true of most programming languages that I know in fact. My guess is that the name ln ...

9 years ago | 0

Answered
Determining quantities of different integers in a large data set
I'd normally recommend either sparse or accumarray to do the counts. Accumarray is arguably best here, because there is no need ...

9 years ago | 1

| accepted

Answered
Analytical solution of laplace equation 2D
Unless you explain more clearly what you are doing, this is not even a MATLAB question. Really, this feels to me like a question...

9 years ago | 0

Answered
Compute a limit in two-dimensions
Multiple issues here. syms h g x C t h = 4 g = 3 C = 1 People think they have created avariable like Cas symbol...

9 years ago | 0

Answered
When I try to find the mean rgb for the picture below, it give the value [230,160,168]. For my information, the value for red is [255,0,0]. Is it the background influence the value?
First of all, there are MANY different subtle variations of red. If every pixel in that red shirt was all the same color, you wo...

9 years ago | 0

Answered
max(dg) returns "Subscript indices must either be real positive integers or logicals."
Simple. Don't create a variable named max. How should MATLAB know if you do that, that then when you try to use the FUNCTION nam...

9 years ago | 1

Answered
All combinations of a (minimum number of) elements in a vector that sum greater or equal to a given number
As it is, I'm afraid this is one of those combinatorially nasty problems that cannot be solved effectively using brute force, at...

9 years ago | 3

Answered
Finding a matrix that its image (range) equals to kernel (null space) of another matrix
Is there a reason why you would not just use null? help null When you need to do something, learn how to use lookfor. In...

9 years ago | 0

Answered
How can I interpolate the 2-dimensional data
1. Download <https://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans inpaint_nans> from the file exchange. 2....

9 years ago | 0

Answered
Numerical solution of equality
The solution is trivial. t == 0 Assuming that you want a non-trivial solution, are w and wn known? If not, then no numer...

9 years ago | 1

Answered
How can I solve optimization problem without using Symbolic Math Toolbox?
Is this your homework? If so, then you need to be doing your homework. If not, then you need to use common sense. Why not do ...

9 years ago | 1

Answered
Finding limits such that integral achieves desired value
Seriously? syms T upper_lim; acc_indef = -2.5*T; vel = int(acc_indef,T,0,upper_lim)+5; vel vel = 5 - (5*...

9 years ago | 0

Answered
How to custom sort a vector with respect to another vector of unequal length
You appear to be looking to bin your data. Use histcounts. (REALLY!) Read the help.

9 years ago | 0

Answered
How do i get exact transfer function calculation?
You will NEVER get an exact result using floating point computation. NEVER. If you want exact results, you need to use symbol...

9 years ago | 0

| accepted

Answered
How would you calculate the amount of 1 sets in a matrix?
Mtx1 = [0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1]; ind01 = strfind([0,Mtx1],[0 1]) - 1; ind10 = strfind([Mtx1,0...

9 years ago | 0

| accepted

Answered
How to use argmax in 3D matrices?
Um, read the help for max? If you are that much of a beginner, then you should start out by reading the getting started tutorial...

9 years ago | 2

Answered
Get the eigenvalue of a known eigenvector
What basic property do you know about the eigenvalues and eigenvectors? Come on, if you are using them, you ought to know! If...

9 years ago | 0

Answered
As the administrator of a Windows PC, can I create a Matlab code that a user can execute, but that this user cannot neither read nor copy?
In order to prevent the code from being read, you have the choices of p-code or compiled code. A problem is that of moving th...

9 years ago | 1

Answered
How to calculate the area which located between curve and x-axis?
You apparently know the lower and upper limits. So make a copy of the data, extracting only the data inside those limits. Then c...

9 years ago | 0

Answered
undesired gaps in alphashape?
It looks like an alpha ball of radius 1 is just slightly too small. Using my own alpha shape code, written long ago, I find it w...

9 years ago | 0

Answered
Can I get a trial of Mapping Toolbox?
I assume you can do so. But Answers cannot answer questions like this. We don't have any official capacity here. Send your re...

9 years ago | 0

Answered
Matrix with gradually increasing!
flip(tril(ones(5))) ans = 1 1 1 1 1 1 1 1 1 0 1 1 1 0 ...

9 years ago | 0

| accepted

Answered
System of linear equation with mixed solution
You have a 5x5 linear system, A*x = B. The solution is unique. Given the coefficients you have provided, I get these results:...

9 years ago | 1

Answered
How do I swap the elements in two arrays?
Do you mean this? [a{3}, b{3}] = deal(b{3},a{3});

9 years ago | 0

| accepted

Load more