Risposto
Warning: Matrix is singular to working precision. Help?
Do you want array division when you write (u0*I*y)/(2*pi*rplus) and similar expressions? If so, then you need to use ...

circa 11 anni fa | 1

| accettato

Risposto
Index must be a positive integer or logical. Very simple program.
You cannot use the same name for a function and for its output argument. Try function [val]=f(x) val=((x^5...

circa 11 anni fa | 0

| accettato

Risposto
Abs and angle of complex number with symbolic object
Well, for part 1 you have to assume a is a non-negative real: syms a assume(a>0) Then >> abs(a) ans = a I ha...

circa 11 anni fa | 0

Risposto
adding rows somewhere in the array
Then, when you want to build the complete |LOCATION| matrix, you can do something like LOCATION2 = zeros(15, 4); LOCATION2...

circa 11 anni fa | 1

| accettato

Risposto
adding rows somewhere in the array
Do you mean that you simply want to find which numbers are missing from |frame_num|? You can do that with missing_nums = set...

circa 11 anni fa | 1

Risposto
how do i solve this non linear system?
|fsolve| will only pass in a single argument, so |i| will be undefined. Assuming you want to solve this equation for fixed value...

circa 11 anni fa | 0

| accettato

Risposto
issue with imshow ploting
It is probably a scaling issue. What are the sizes of |image| and |phi|?

circa 11 anni fa | 0

Risposto
How to pause the code?
If you only want to pause when specific conditions are satisfied, you can put the |pause| or |keyboard| statement inside an if c...

circa 11 anni fa | 0

| accettato

Risposto
Problem with my Callback function or handles values
You need to save |handles| back to the figure after each call, as in: handles.STANumber = handles.STAumber + 1; guidat...

circa 11 anni fa | 0

Risposto
issues with function find()
Try tr=0:.1:20; tr = round(tr*1e12)/1e12; b=find(tr==2.4) This is a problem with finite precision. See the explana...

circa 11 anni fa | 0

Risposto
Explicit solution not found using solve
I know nothing about mimicking portfolios, but I do know that anything you assign to |thetaa| is lost when you call syms the...

circa 11 anni fa | 0

| accettato

Risposto
How can I multiply matrix of vectors by matrix?
Not without loops, but hiding them inside bsxfun... M = rand(140,160,3); % image data T = randn(3); % transformatio...

circa 11 anni fa | 0

Risposto
Please expalin the error
The documentation for |struc| indicates that it takes three input arguments: >>help struc struc Generate typical struc...

circa 11 anni fa | 1

| accettato

Risposto
Changing the default tolerance for fmincon
You can pass an options structure to |fmincon|. You create the structure using <http://www.mathworks.com/help/matlab/ref/optimse...

circa 11 anni fa | 1

Risposto
how to evaluate a symbolic function in matlab
syms x func=cos((pi*x)^4); RHS=diff(func,x,2); xx=-1:0.1:1; d2f = subs(RHS, xx)

circa 11 anni fa | 0

Risposto
How to use if statements with arrays?
y = (x>2).*(x+1) + (x<=2).*(x-1)

circa 11 anni fa | 4

| accettato

Risposto
how to save a file in ".m" format using command
You should not save data in an m-file; a mat-file is the best way. I believe the problem is how you are loading the data. If you...

circa 11 anni fa | 0

Risposto
Error: Unbalanced or unexpected parantheses
You cannot use indexing in the arguments listed in the function definition. Try instead: function [u,w] = velocity(H,sigma,k...

circa 11 anni fa | 1

| accettato

Risposto
To remove the repeated number
Use unique([1 2 2 2 3 4 5]) Note that this will also sort the elements. -B

circa 11 anni fa | 1

Risposto
Simulating events of varying duration
This seems to be what you are looking for: onset=[23 40 67 88] duration=[3 9 2 6] all=cell2mat(arrayfun(@(a,b)a+(1:b)-1,...

circa 11 anni fa | 1

Risposto
Floating point numeric display vs engineering / exponential notation
The format in which the numbers are printed is not affected by the source (in this case, a CSV file). That is, as long as you re...

circa 11 anni fa | 0

Risposto
how to find lambda from this formula?
|e = eig(A)| returns a vector of eigenvalues of the matrix |A|. To get the associated eigenvectors, use |[V,D] = eig(A)|. See th...

oltre 11 anni fa | 0

| accettato

Risposto
Deleting a field from a sturcture
Did you save the results of rmfield back to myStruct? myStruct = rmfield(myStruct, myField) Brian

oltre 11 anni fa | 0

| accettato

Risposto
Any way to force Command Window Answers to print Fractions?
Try format rat -Brian

oltre 11 anni fa | 1

| accettato

Domanda


Why does Stateflow evaluate the condition [x >= (1/2)] differently from [x >= 0.5]?
I have created a minimal example (available here: <http://dl.dropbox.com/u/99981625/fraction_in_condition.mdl>) consisting of a ...

oltre 11 anni fa | 1 risposta | 1

1

risposta