已回答
Ellipse implicit equation coefficients
First, if the centre is nonzero, then that form of the ellipse equation will not work. You need the more general quadratic form ...

13 years 前 | 0

| 已接受

已回答
[DISCONTINUED] Wish-list for MATLAB Answer sections.
Each question on the Home page should have an icon indicating whether there has been activity on the question since you last loo...

13 years 前 | 0

已回答
Differential equation system in Optimization Toolbox
Your problem is a linear program in the arrays x1, x2, z1, z2. Because the RHS of the ODEs is piecewise constant, the problem ca...

13 years 前 | 0

已回答
How to index a cell with two columns?
[data(:, 1); data(end,2)]

13 years 前 | 0

| 已接受

已回答
Euclidean Distance (huge number of vectors)
You could do something like this and leave it running overnight :| Obviously you'd define your histogram edges to be relevant to...

13 years 前 | 1

已回答
Can Matlab do L1 minimization?
Assming |f| is all ones, and you're wanting to minimise the 1-norm of |x|, then your code will be doing what you wish

13 years 前 | 0

| 已接受

已回答
Trouble with using atan in script, output generated by script is not correct.
Here's what happens. # |alphai2| gets computed # the variable |wt|, which |alphai2| depends on, gets updated. # The exit...

13 years 前 | 0

已回答
divergence results using ode45 in .m-file and using ode45 simulink
Try forcing |ode45| to use time steps no bigger than the simulink ones, i.e. opts = odeset('MaxStep', 0.1); %substitute 0....

13 years 前 | 1

已回答
How to find a element in cell array
Can you define your cell array differently (can it be a 2D cell array, rather than a cell array of cell arrays?) If so, then ...

13 years 前 | 0

已回答
How to replace some of the value in the matrix with NaN?
Here's a much faster method that satisfies both of your constraints. It may be possible to vectorise the loop, but it is, in my ...

13 years 前 | 0

已回答
How would you plot, run a for loop, and a string at the same time?
change your cell format slightly colors = {'ro', 'ko', ... etc } then plot(..., colors{k}) not colors(k...

13 years 前 | 1

已回答
Function or constraints have too few arguments on the right to satisfy the left
Your nonlinear constraints need to be in a function of the form function [c, ceq] = g(x) c = [8*75./x(5) ....... ...

13 years 前 | 0

| 已接受

已回答
adding of signals
Also you can use |interp1| if you don't have the image processing toolbox

13 years 前 | 0

已回答
Solving Systems of Linear Equations
It very much depends on your matrices. What are the dimensions? Rank? If A square and full rank then |X| is uniquely determi...

13 years 前 | 0

已回答
solve nonlinear equations + numerical integration
Final answer: your equations have no solution t = 0.1:0.1:0.6; z = [0.0213; 0.0222]; x = [1.4334 1.46; 1.435 1.46]; ...

13 years 前 | 0

已回答
solve nonlinear equations + numerical integration
You could pose it as an optimization problem. First set up a function that will be zero when z1,z2 are equal to their correct va...

13 years 前 | 0

| 已接受

已回答
How to get the location/coordinate of a value in the matrix?
[I,J] = find(isnan(A))

13 years 前 | 0

| 已接受

已回答
How to instead the "for" loop?
Un-nest your loops - your a,b and c,d loops are independent of each other. What you're doing is running your inner two loops gaz...

13 years 前 | 0

已回答
right shift of integer variable
the C language doesn't officially specify what happens on a right shift of a negative signed integer, it's up to any given compi...

13 years 前 | 0

已回答
right shift of integer variable
|bitshift| is for unsigned integers. What exactly do you want your signed right shift to do?

13 years 前 | 0

已回答
round robin Loop.... help plz
You're never updating |totalCPUtime| so your |while| loop never exits

13 years 前 | 0

| 已接受

已回答
runge-kutta
Writing a new answer so that I can use markup (MathWorks, please fix this!!). You need a couple of things - first, the time valu...

13 years 前 | 2

| 已接受

已回答
Please help..About probability ?
You can do all of your dice throws with a single call to |randi| like this: randi(6, 2, n) that should get you on your w...

13 years 前 | 0

| 已接受

已回答
Writing a sin function program dealing with factorials, help in editing and error?
I take it this is a programming exercise, not a straight mathematics question - you can work out the number of terms pretty easi...

13 years 前 | 0

已回答
How to create non-repetitive random integers
randperm(100, 70)

13 years 前 | 1

已回答
Where do people learn "bad" programming habits (i.e., goto, global, and eval)
At my university it's usually the engineering school's fault. When students learn to solve ODEs with MATLAB they seem think the ...

13 years 前 | 2

已回答
Calculating the volume inside an arbitrary closed surface
If you have R2012a doc integral2 Otherwise doc quad2d

13 years 前 | 0

| 已接受

已回答
Index exceeds matrix dimensions.
The line you want is: vtemp = [xtemp,ytemp]; |xtemp| and |ytemp| are numbers not vectors

13 years 前 | 0

| 已接受

已回答
Unknown Error
The fourth argument to |csvread| should be a range, i.e. a vector with four entries. You have |'eof'|. Try removing this argumen...

13 years 前 | 0

已回答
Simple Constraint Question for Quadprog Problem
As far as I can understand your code, you have a constraint that the sum of |x| is 1, and hence the required constraint is that ...

13 years 前 | 0

加载更多