Answered
can't plot exp * sin graph
Your problem lies in not understanding the difference between the .* and * operators. (In fact, this was probably why you were a...

6 years ago | 3

| accepted

Answered
whats wrong with my code
I wouldstart by saying this is not how you define a function. function fact[a,b,c]=my_fact(x) That is not valid syntax to defi...

6 years ago | 0

Answered
Simple Code working in the Command Line but not through function
You change grad inside nnCostFunction. But do you RETURN grad? No. What arguments do you return? J = nnCostFunction(nn_params, ...

6 years ago | 0

Answered
Im trying to solve an equation that have variable on left and right side
How is depth relevant to anything here? It does not appear in the expression. Maybe I'm just not thinking very "deeply" today. ...

6 years ago | 0

| accepted

Answered
How do I solve this equation?
I've added a separate answer here only to explain how you would have used dsolve, and then how you would plot the solution. You...

6 years ago | 0

| accepted

Answered
Local Minimum possible - exit flag 2 - Non linear optimisation problem with Non-linear constraints.
Setting the tolerances to some absurdly tiny number is something I frequently see people do. It almost never seems to improve th...

6 years ago | 1

Answered
Explicit solution using Syms tool box
You WANT to find a solution to a general 12'th degree polynomial. There are things I want, but cannot have either. In this case...

6 years ago | 0

Answered
Generate a vector under norm condition
As long as you are willing to specify that the vector is normally distributed under a constraint, you can do this. In fact, it i...

6 years ago | 2

Answered
Creating 3d surfaces from two independent functions
Why is this not just f3 = @(x,y) min(f1(x,y),f2(x,y)); You want the result which is the smaller of two functions. In your ex...

6 years ago | 0

| accepted

Answered
I can't solve this nonlinear equation
You have too many equations, too few unknowns. 8 equations, with 9 unknowns. This is often called an under-determined problem. ...

6 years ago | 0

| accepted

Answered
Doesn't calculate the integral (only int sign is added)
Actually, Wolfram Alpha got this one with no help. But sometime you need to do a little extra. The obvious thing I would try is ...

6 years ago | 0

| accepted

Answered
Stepsize in integral2 or quad2d
integral (as with integral2) does not have a "stepsize". As an adaptive code, it looks at the local shape of the function, in th...

6 years ago | 0

| accepted

Answered
Plotting functions with removable singularities
I can't really think of anything obviously easy. I might do it like this: F = @(x) x + 3; fplot(F,[-3,3],'m') hold on H1...

6 years ago | 1

| accepted

Answered
Research program support MathWorks
You may be confused. MathWorks is not here as a service company, where they will write software to your specs to accomplish you...

6 years ago | 0

Answered
Please check if I have wrote the functions correctly:
There are three issues that you have problems on here, although only one of them may be perceived as significant. The important...

6 years ago | 0

| accepted

Answered
Curve Fitting Weibull error
We are given not much more than this: fun = @(P,x)(-P(1)/P(2)).*(((x-P(3))/P(2)).^(P(1)-1)).*exp(-((x-P(3))/n).^P(1)); fun is ...

6 years ago | 0

| accepted

Answered
Extract index of data point from Curve fit App
No. That is a level of detail not provided, nor can you toggle any options to then provide the informtion you want. I suppose y...

6 years ago | 0

| accepted

Answered
I need to helpe to solve this equation x-y=12, 0<x<22, 0<y<100
As I said, there are infinitely many solutions. As well, it is often the case that the solution set of a system of inequalities...

6 years ago | 0

| accepted

Answered
Interpolation data from cyclic experiment: Non unique points in x axis
You cannot use interp1 to solve this, at least not directly, since the data does not represent a single valued function of x. Th...

6 years ago | 0

Answered
How to simplify a common factor in a symbolic equation
Its still easier to just use cut and paste. ;-) Damn these computers. I want my slide rule back! As I said, sometimes it gets c...

6 years ago | 0

| accepted

Answered
Sorting Variables by Value
You read about sort. Great. READ ALL ABOUT SORT. And get used to working with arrays, with vectors, rather than named variables,...

6 years ago | 0

| accepted

Answered
Warning: Unable to find explicit solution for 1 unknown
Not everything you write down has an analytical solution. In fact, most expressions that you can formulate will have no solution...

6 years ago | 0

| accepted

Answered
Adding matrix columns randomly
You want to pick random columns from A and B? Can they ever be the same column? Since A and B are the same matrices, we can make...

6 years ago | 1

Answered
Why does my code require a long time to evaluate when I use hpf
The speed of evaluation for hpf entirely depends on how many digits you tell it to carry. Short numbers evaluate fast. Huge numb...

6 years ago | 1

| accepted

Answered
Problem with my non linear pendulum code
Why do you think there is a problem? The code runs fine. Are you worried that the editor tells you that essentially, t is not u...

6 years ago | 1

Answered
How is the polyarea function input order to receive correct results?
Yes. You do need to think about what you are doing. I'll create a quasi-triangular region as an example. px = [0, 1, .5, .49];...

6 years ago | 0

| accepted

Answered
How to change a column vector into a square a matrix?
This is something that I've sometimes been surprised that is not already a function in MATLAB, thus, to create a symmetric matri...

6 years ago | 3

| accepted

Answered
Matlab determinant equation solver
Just for kicks, I assume that you really have 792 such 3x3 problems. JUST USE A LOOP. Could you convert this into a cell array o...

6 years ago | 0

| accepted

Answered
For loop giving me wrong values
I tried to look through the code for a few minutes now, looking for something obvious. So then I downloaded your data, put your ...

6 years ago | 1

Answered
Assign values to intervals of matrix
Use MATLAB as it is designed to be used - as a language that works with vectors and matrices. A(:,3) = repelem(t1,580);

6 years ago | 1

| accepted

Load more