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

15 years ago | 0

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

15 years ago | 2

| accepted

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 1

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

15 years ago | 0

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

15 years ago | 6

| accepted

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

15 years ago | 0

| accepted

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

15 years ago | 0

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

15 years ago | 1

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

15 years ago | 7

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

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

15 years ago | 0

| accepted

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

15 years ago | 1

| accepted

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

15 years ago | 2

| accepted

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

15 years ago | 0

| accepted

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

15 years ago | 0

| accepted

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

15 years ago | 0

| accepted

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

15 years ago | 0

| accepted

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

15 years ago | 0

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

15 years ago | 1

Answered
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);| #...

15 years ago | 0

| accepted

Answered
xls export problem
OK, your problem is the special characters in the string. You can't have slashes and line breaks in a filename. When you do ...

15 years ago | 0

| accepted

Load more