Réponse apportée
how to efficiently find the indices?
|sort| is your friend: First we sort the entries of |A| so that like entries are adjacent [S, iSorted] = sort(A(:)); ...

environ 14 ans il y a | 3

| A accepté

Réponse apportée
Matlab Help
"Use MATLAB to solve the following...." I've done it, now what do I get? Chocolate fish?

environ 14 ans il y a | 0

Réponse apportée
how to efficiently find the indices?
Depending on whether you want the first or the last occurence [uM, I] = unique(M, 'first') [uM, I] = unique(M)

environ 14 ans il y a | 0

Réponse apportée
Generation of a matrix
To give you some context, 9^275 = 2610298031214360458037978142613933577909126030175802622149530339319603934430500962487448801...

environ 14 ans il y a | 0

Question


Licensing: Parallel Computing Toolbox labs vs independent MATLAB sessions
From a licensing perspective, what's the difference between running |n| independent MATLAB sessions and running |n| Parallel Com...

environ 14 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
matrix automation problem
This is one annoying case where the sparse version |spdiags| can do more than the full one |diag| n = 10; m = n-2; c1...

environ 14 ans il y a | 0

Réponse apportée
In an assignment A(I) = B, the number of elements in B and I must be the same - error using ode 45
Hi Peter Your code is actually fine (I just ran it). You must have something nasty hanging around to give that error (as Walt...

environ 14 ans il y a | 0

Réponse apportée
Finding lists of connected triangles in TriRep class
Why don't you want to define an adjacency matrix? If you do, then you could just use the |components| routine in MATLAB-BGL <...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
kl transform
There's a demo in the file exchange <http://www.mathworks.com/matlabcentral/fileexchange/30678-image-compression-demo-usins-k...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
Is deleting threads helpful in this forum?
My opinion is that a question can be deleted until it has been answered. Then it can't. Editors, and only editors, should be abl...

environ 14 ans il y a | 2

Réponse apportée
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 ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
[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...

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
How to index a cell with two columns?
[data(:, 1); data(end,2)]

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 1

Réponse apportée
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

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
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....

environ 14 ans il y a | 1

Réponse apportée
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 ...

environ 14 ans il y a | 0

Réponse apportée
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 ...

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 1

Réponse apportée
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) ....... ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
adding of signals
Also you can use |interp1| if you don't have the image processing toolbox

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
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]; ...

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
How to get the location/coordinate of a value in the matrix?
[I,J] = find(isnan(A))

environ 14 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
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...

environ 14 ans il y a | 0

Réponse apportée
right shift of integer variable
|bitshift| is for unsigned integers. What exactly do you want your signed right shift to do?

environ 14 ans il y a | 0

Charger plus