Answered
comments line change automatically
If you look in the editor preferences, you will see that you can force the editor to wrap comments at some column number, that c...

10 years ago | 0

| accepted

Answered
subtracting elements in a vector
A for loop is always a viable solution to a problem when you see no easier way out. And a single for loop is not terribly ineffi...

10 years ago | 3

Answered
How do I write a function which computes the first n values of factorial k using a for loop?
Haley has made an honest attempt here, and gotten reasonably close to what is needed. In fact, there was only one problem, in th...

10 years ago | 1

Answered
How to process multiple matrices. Checking whether the elements of a matrix are within the specified range
And this is only one of the reasons why what you did is a terribly bad idea. Combine all into one matrix. Do it once. Get it ove...

10 years ago | 1

Answered
howa can i project M-1 vectors to it's orthogonal subspace ⟨A1⟩⊥ (A1 is a vector ) in matlab
Huh? The projection of any of a set of vectors into a subspace that is orthogonal to that set will be the zero vector. So you...

10 years ago | 2

Answered
How to make a 2D-lookup table with not monotonically and arbitrary datas?
Download gridfit from the file exchange. This was in fact what I originally designed the set of tools it is based on, for the cr...

10 years ago | 0

Answered
"Variable 'DivisionCount' should beinteger datatype."? integer datatypes?
Lots of them. help uint8 help uint16 help uint32 help uint64 help int8 help int16 help int32 help int6...

10 years ago | 1

Answered
How to find out if singular matrix has infinite solutions or no solution?
(This is not really a MATLAB question, but linear algebra 101. But you did show enough MATLAB that I'll relent and answer. And y...

10 years ago | 2

| accepted

Answered
How do I properly combine "and", "or" and "if"
Note that this code fragment ALWAYS returns true 18<a<60 since regardless of the value of a, (18<a) ALWAYS returns eithe...

10 years ago | 1

| accepted

Answered
How to resolve this Unexpected MATLAB expression?
What is R at the end? Why do you think it belongs there? If it does not belong there, then do you think that may possibly be the...

10 years ago | 0

Answered
How to sum up elements in Fibonnaci sequence?
Well, you DID make an effort. And it is not even that bad an effort at that. I'm willing to help when someone makes a serious ef...

10 years ago | 0

| accepted

Answered
Error: Double cannot convert the input expression into a double array.
You are (apparently) the author of the code. You never defined the variable order, yet you use it, here for example first, bu...

10 years ago | 1

Answered
Differentiating a symbolic function by a lot of variables without loop.
Often people do things in MATLAB where they use loops excessively. So we seee code with heavily nested loops, when a simple matr...

10 years ago | 2

| accepted

Answered
Good value for root mean square error?
As dpb said, it is impossible to know if some arbitrary value for RMSE is good or bad. Only you know if it is good, because only...

10 years ago | 0

| accepted

Answered
Is there source code available for the lteRMCDLTool function?
Try this: type lteRMCDLTool.m If it generates nothing but a help block, then the code is compiled. In that case, there i...

10 years ago | 1

| accepted

Answered
How to use not equal to '~=' operator in if statement?
A problem of elementary logic? You want an error to return only if A is not in the set {'A','B'}. So a call to ismember might...

10 years ago | 3

| accepted

Answered
Make calculations based on previous results
A loop seems trivial and obvious, even though you give no indication of what computations you need to do. If you don't have any ...

10 years ago | 0

Answered
creating dye distribution profile with image processing
If both pics are mostly identical, then what do you get when you subtract them? ZERO. What color is [0 0 0]? Black. So you sa...

10 years ago | 1

| accepted

Answered
while using FMINCON can we pass matrices as arguments while using calling objective function saved as seperate file
Yes. You can pass in any arguments you wish, matrices or not. If you can pass them into a function, why would you think you c...

10 years ago | 0

| accepted

Answered
How can I concatenate two or more arrays without using num2str?
The most obvious solution is to appreciate how a number is constructed in decimal form. So, rather than convert to characters, t...

10 years ago | 1

| accepted

Answered
numerical solution of equation
I recall an old phrase: "If wishes were horses, then beggars would ride." Just wanting a solution to a set of nonlinear equat...

10 years ago | 0

Answered
different minimum result of convex function by using fminsearch
fminsearch is a very simple optimizer, so I am not at all surprised to see this happen. 1. A 6 dimensional problem is near th...

10 years ago | 0

| accepted

Answered
Combining multiple functions within one script
If your goal is to use those function independently, then they need to be saved as separate m-files, NOT in one large file. Whil...

10 years ago | 0

Answered
Mean-Variance Optimization, constraint as matrix operation
Strictly impossible using linprog. PERIOD. EVER. Your objective function is a quadratic form. It is NOT linear. However, n...

10 years ago | 0

Answered
Solving a system of nonlinear algebraic equations numerically
Use fsolve from the optimization toolbox. Expect a huge number of possible solutions. The result will then of course depend o...

10 years ago | 1

Answered
how can i solve this equation?
help solve The answer will probably be in the form of a Lambert W function.

10 years ago | 0

Answered
Distance from an object at time intervals with a constant velocity
How is this a MATLAB question at all? You claim that you do not know the total distance, but that you know the velocity (call it...

10 years ago | 0

Answered
how to create wave files with different names in loop
Why? Effectively this same question gets asked all the time. Surely you can create a cell array, or perhaps even better, a st...

10 years ago | 0

Answered
Syntax error in matlab?! Help Please?
It looks like you are randomly using the elementwise operators in some places, but not in others. That will get you in trouble. ...

10 years ago | 1

| accepted

Load more