Respondida
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 ...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

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

más de 11 años hace | 1

| aceptada

Respondida
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...

casi 12 años hace | 1

Respondida
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)

casi 12 años hace | 0

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

casi 12 años hace | 4

| aceptada

Respondida
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...

casi 12 años hace | 0

Respondida
How do I stop suppressed commands being printed in the command window?
Try echo off

casi 12 años hace | 1

Respondida
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...

casi 12 años hace | 1

| aceptada

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

casi 12 años hace | 1

Respondida
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,...

casi 12 años hace | 1

Respondida
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...

casi 12 años hace | 0

Respondida
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...

casi 12 años hace | 0

| aceptada

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

casi 12 años hace | 0

| aceptada

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

alrededor de 12 años hace | 1

| aceptada

Pregunta


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 ...

alrededor de 12 años hace | 1 respuesta | 1

1

respuesta