Risposto
How can I find saturated pixels in an image?
|idx = all(A==255,3);| would give you a logical array that is |true| at all white pixels (in a |uint8| representation). Other...

oltre 15 anni fa | 2

Risposto
get data from excel file
# |xlsread| to read both files into cell arrays. # Use set operations (like, say, |intersect|) to find the names that are commo...

oltre 15 anni fa | 0

Risposto
Matlab Minimum
find(A==min(A)) will get them all. Then you can choose whichever you like. To get just the last one find(A==min(A),1,'la...

oltre 15 anni fa | 2

| accettato

Risposto
solving a linear initial value problem in MATLAB
Oh, sorry, it looks like Jan & I both misread/misinterpreted your questions. You're supposed to write your own ode integrator? ...

oltre 15 anni fa | 0

Risposto
warning: badly scaled matrix
The possibility of an ill-conditioned Jacobian is an inherent property of Newton/gradient methods. It occurs whenever the funct...

oltre 15 anni fa | 0

Risposto
solving a linear initial value problem in MATLAB
# Convert the third-order equation into a (3-D) first-order system # Write a function that defines the rate equations. The sys...

oltre 15 anni fa | 0

Risposto
Representing a Matrix Graphically (but not exactly)
z = [5 2 1 <etc> [m,n] = size(z); [x,y] = meshgrid(1:n,1:m); plot3(x(:),y(:),z(:),'o') or text(x(:),y(:),num2str(...

oltre 15 anni fa | 0

Risposto
FEVAL error in implementing Newton's method.
The accepted answer from Paulo looks like a great resource for the theory behind gradient methods, but I'm not sure if that's ac...

oltre 15 anni fa | 0

Risposto
Combining separate files
What are your globals c2 and z? Not having access to them, I hard-coded in a scalar for c2 and a 201-element vector for z, and ...

oltre 15 anni fa | 0

Risposto
Permutations function
OK, still not sure if I quite get all the details (I think I'm getting mired in the terminology of samples vs trials vs particip...

oltre 15 anni fa | 1

Risposto
Matrix Division - how does it work?
Yes, what you have is valid MATLAB, but what do you mean about how it would break down? This seems more like a question of line...

oltre 15 anni fa | 0

Risposto
How do I convert a value from a cell array into an integer?
In addition to what David and Andreas said, I'm wondering if this table is coming from a GUI (ie a |uitable|) or something like ...

oltre 15 anni fa | 6

| accettato

Risposto
How to solve ODEs that are a function of the derivatives of the state variables
Ah, that actually wasn't what I was thinking (I don't know why, b/c in retrospect your question makes perfect sense). Anyway, t...

oltre 15 anni fa | 0

| accettato

Risposto
Permutations function
Mostly going to echo the comments made by The Usual Suspects. In particular, can you explain what you're trying to histogram, w...

oltre 15 anni fa | 0

Risposto
Issue with fractional step-sizes
You're mixing up the "physical" steps and the array indexing. In RK methods, the intermediate steps are evaluated between collo...

oltre 15 anni fa | 1

Risposto
Matrix Division - how does it work?
Your example doesn't work, using standard MATLAB syntax, because A, B, and C would be row vectors (1-by-2), so [A B C] would be ...

oltre 15 anni fa | 7

Risposto
how to select name at random from list of names in text file?
General approach: # Read the names from file into a cell array of strings -- see |textscan| # Make a figure window with |uic...

oltre 15 anni fa | 0

Risposto
word scrambler script
Is this a homework problem? Without wanting to do the whole thing for you, let me suggest an approach that works: # Use the ...

oltre 15 anni fa | 0

Risposto
control mouse clicking
|ButtonDownFcn|? |ginput|? Please explain what you mean by "control mouse clicking operation". What exactly do you want to do...

oltre 15 anni fa | 0

Risposto
How can I use "dir" with multiple search strings? or join the results of two dir calls?
Do you just need the filenames, or do you actually need file info as well? If it's just the names, the simplest way (I think) i...

oltre 15 anni fa | 0

Risposto
Plot p.d.f. from m.g.f
Sorry, this question got a bit lost when Answers had a glitch a few days back... I hate to state for sure that there's no fun...

oltre 15 anni fa | 0

| accettato

Risposto
Failure in initial user-supplied objective function evaluation.
This is a very common issue. These MATLAB functions require a handle to a function of one variable. Hence "too many input argu...

oltre 15 anni fa | 1

| accettato

Risposto
How to display a zoomed image in GUIDE
I assume you've set the two axes to be the same size, and you've loaded the image, so you can get its dimensions (m-by-n, say). ...

oltre 15 anni fa | 2

| accettato

Risposto
Simple Imaging questions , dealing with matrix maniuplation
OK, so I'm trying to walk the line between helping you and doing your homework... so, how about this? I'll step you through sol...

oltre 15 anni fa | 0

| accettato

Risposto
How to obtain p values for all pair-wise comparisons from the multicompare() function?
Not currently, according to <http://www.mathworks.com/matlabcentral/newsreader/view_thread/238957 this discussion>.

oltre 15 anni fa | 0

| accettato

Risposto
Need help with looping a simple linear system
# I assume this is some kind of hw/exercise. If not, use a MATLAB root-finder, rather than writing your own. # As proecsm notes...

oltre 15 anni fa | 0

| accettato

Risposto
Vector Time Conversion to Serial numbers
Serial dates are in units of days, so you can add fractional days to them. So you should be able to take the time, divide by 24...

oltre 15 anni fa | 0

| accettato

Risposto
Simple Imaging questions , dealing with matrix maniuplation
Start by working out how to do it on paper/by hand for a very small example (2-by-4, etc). Work out the rule/formula for how th...

oltre 15 anni fa | 0

Risposto
Simple Matlab Random Number Generation
How about a brute-force approach? ntot = 0; n = 10000; x = zeros(n,5); while ntot<n r = rand(100,4)-0.5; ...

oltre 15 anni fa | 1

Risposto
Connecting Points in a Scatter Plot
Focusing just on the problem at hand, I'd suggest # changing line 126 to |Thrust(mdotfuel+1,mach,Alt) = mdotfuel*(U8-Uo);| #...

oltre 15 anni fa | 0

| accettato

Carica altro