Answered
Why does fimplicit3 provide an empty plot?
The second equation does indeed have has an implied radius of ZERO. So the solution is a single point, where x=y=z=0. It is the ...

4 years ago | 1

| accepted

Answered
Having trouble with nonpolynomial equation systems
You have how many equations? (6 by my count.) You have how many parameters? l, teta, x, y, fi, d, R, gama. That is 8 parameters...

4 years ago | 0

Answered
Generate a large almost diagonal matrix
This is commonly known as a bidiagonal matrix. It is far and away best defined using sparse storage, as produced by spdiags, s...

4 years ago | 0

Answered
Using a specific number of digits
Are numbers typically written with leading zero digits? (NO. At least not in anything I've ever done.) The number 001 is no diff...

4 years ago | 0

| accepted

Answered
Improving first coding project
+1. This is what I would call a good post. You are looking to learn MATLAB, so you chose a problem (one that interests you) that...

4 years ago | 2

Answered
How to do type II double integration on matlab
First, type I and II are not any common names for integrals that I know of. It might be what your teacher calls them. Maybe the ...

4 years ago | 1

Answered
solving an equation not by sym
You have this basic first order linear recurrence relation: E(n+1,x) = 2/x + 4*E(n,x) Where E(1,x) = 0 is a given, but al...

4 years ago | 0

Answered
Symbolic dependency apparently sometimes gives wrong answers
To be honest, this appears to be more of a bug report than anything else, since that option in hasSymType does not apprear to be...

4 years ago | 0

Answered
I want know how can I calculate variance & expectation in Matlab for 10 sample
It would seem your question defines a discrete random variable on the set s, where you have given the probability at each point....

4 years ago | 1

| accepted

Answered
Fit Curve to a user defined function
You cannot assume that fit will know the name of every possible nonlinear model form. monod is apparently not one of the predefi...

4 years ago | 1

| accepted

Answered
dec2bin function provides wrong answer
So the binary representation of 8 is not 1000? Let me see, 8 = 1*2^3 + 0*2^2 + 0*2^1 + 0*2^0. I think you are mistaken. dec2...

4 years ago | 0

| accepted

Answered
2 Questions about user defined function
Why does it not work in the format compact question? You had this: format compact function [a1,b1]=fn_name(y) ... Simple ru...

4 years ago | 1

Answered
How do I return the index of a vector I am defining?
You want the function withinBounds to know WHERE in the vector the reslts of that function are being stuffed? This goes against...

4 years ago | 0

| accepted

Answered
I'm trying to run a loop until a condition is met
Simple rule #1: A for loop is best when you KNOW how many iterations you wish to perform. How many times do you want it to loop?...

4 years ago | 0

Answered
How to describe a sequence of numbers as a variable using Genetic algorithm in MATLAB?
You can't simply tell GA to use such a permutation sequence. Although I suppose you could set up a nonlinear constraint that wou...

4 years ago | 0

Answered
Questions about infinity in matlab
What to do? Learn to work with large numbers like that. Sorry, but you just do. A common solution is to use logs. Don't compute ...

4 years ago | 3

Answered
Extract the Weibull coefficients
When you don't know what the name of a function in MATLAB might be, use the lookfor function. lookfor weibull If you scan down...

4 years ago | 0

| accepted

Answered
Recursion Revisited - My Code:
Your code IS working acceptably. Of course, if you call it with a vector of length 1e6, or something like that, you can be getti...

4 years ago | 0

Answered
How to find the maximum point of a fitted curve
What was wrong with the result? (Since I wrote the SLM tools.) Can I test your code? Of course not. We are not given the routin...

4 years ago | 0

| accepted

Answered
How do I normalise a Matrix that is close to Singular or badly scale
You CAN'T do it. Or, sometimes, you can. And it all depends on what makes the matrix singular, or badly scaled. How was the matr...

4 years ago | 0

Answered
How to compare the complexity of two algirthms in MATLAB
Sorry, but this has been discussed many times before on this site. There is no tool that does it for you, nor can one easily be ...

4 years ago | 1

Answered
How to get max of repeated values?
Easy enough. Use unique, then it is just a call to accumarray. C = [0.5000 0.5000 0.3000 1.0000 0.8000 0.3000 ...

4 years ago | 0

Answered
Solving matrix without values
Yes. Learn how to use the symbolic toolbox. If you don't have it, then you need it for this purpose. syms theta real A = [cos(...

4 years ago | 1

| accepted

Answered
Creating a Lagrange Polynomial with Unknown 'x.'
I can understand where you went wrong, as it is a common mistake. What worked for symbolic variables, did not work for function ...

4 years ago | 0

Answered
what to do in this case?
You cannot set a variable to have a value inside another statement. For example, this line of code would not be valid in MATLAB...

4 years ago | 0

Answered
How do I pass a function a mathematical function of the for x.^2
Time to learn about function handles! A function handle alows you to pass one function to another. f = @(x) x.^2; What is f? ...

4 years ago | 0

Answered
Need help with Exponential Curve fitting
First, plot EVERYTHING. Then if you don't understand what you see, plot something more, or plot it in a different way. load xda...

4 years ago | 0

Answered
ushuffle the matrix elements
a = magic(3) reshape(a(randperm(numel(a))),size(a))

4 years ago | 0

| accepted

Answered
I want to get the covariance matrix from the Hessian matrix, but fminunc returns non-positive definite Hessian.
Fminunc returns its current estimate of the Hessian, which may not be correct at the optimum, because it will be continuously up...

4 years ago | 1

| accepted

Answered
how to check whether a vector in a subspace or not?
You want to test if a new vector (not two at a time!) lies in the column space of a matrix V. Here, V is a 6x7 matrix. V=[2 3 1...

4 years ago | 0

| accepted

Load more