Answered
numeric solve issue for an equation involving a logarithm
Didn't see your comment with your code. This works: imax = (n/2)-2; r = zeros(imax,1); syms b for i = 2:imax; ...

13 years ago | 1

Answered
numeric solve issue for an equation involving a logarithm
If I understand your intent correctly, you're trying to solve the equation r_i = (Log10(b) + b)/2 for b, given a (numeric?...

13 years ago | 1

Answered
Problem applying fminsearch to piecewise numerical solution genereated by ode45
It looks like you're on the right track. I'm a little suspicious of the use of the variable name |fminsearch| in |sim3Cmdb| a...

13 years ago | 0

Answered
How can I create a datetick using if statements?
Do you actually want to create a variable that has two states or is this just about how you visualize a time series? If it's th...

13 years ago | 0

| accepted

Answered
How to import a particular text file and plot.
By specifying a format string of |'%s'|, you effectively asked |textscan| for a single output. But then you asked to read a str...

13 years ago | 0

| accepted

Answered
Finding contents of cell in another one
If I understand your intent correctly, you want every row of |rxn| for which the value in the 5th column is one of values in the...

13 years ago | 0

Answered
Error ??? Subscript indices must either be real positive integers or logicals.
To get the fourth variable: RUM = V(:,4); The |:| as the first index represents all rows. Given your description of t...

13 years ago | 0

Answered
regexp question (-.- 4 word minimum)
I know you've already got it working, but |regexp| challenges are always fun. This seems to work... x = regexp(str,'/([\w\...

13 years ago | 4

Answered
Why is airy(3,1) complex? (No numerical round-off in the complex part)
Looks like a bug in 12a. If you do whos y it shows the class as |double (complex)|, so |isreal| is working properly, bu...

13 years ago | 0

Answered
Experiences with release 2012b
I've had quite a while to play with it. There was a little reorientation time, but I really like it now. I admit that I have a...

13 years ago | 1

Answered
iterating values of a vector under conditions
If I understand you correctly, you have a procedure you want to iteratively apply to a vector, but only to the elements of that ...

13 years ago | 0

| accepted

Answered
random number generation initial state
Digging through the code, |rng(shuffle)| calls |RandStream.shuffleSeed|. In there you can find a comment: % Create a seed ...

13 years ago | 1

Answered
how can we plot this function as 3d with matlab?
Aww, cute. The reason you can't use |surf| or |ezplot| is that these are not designed for this kind of equation. To use |sur...

13 years ago | 0

| accepted

Answered
2 questions regarding text() function in a FOR loop for a CURRENT graph.How to define CURRENT graph?
I'm having difficulty finding the problem. This works when I run it. Are you not seeing any numbers on your graph? (You won't...

13 years ago | 0

Answered
Some basic MATLAB questions
Thank you for your asking such a great question! Matt has basically given you all the info you need for this assignment, but, i...

13 years ago | 5

Answered
How do I use MLE on a shifted gamma distribution?
Peter is the expert on statistical matters, so I'd take his advice on whether what you're trying to do is a good idea. But here...

13 years ago | 0

Answered
Solution of complex equation
If you're doing symbolic work in MATLAB, you need <http://www.mathworks.com/products/symbolic/ Symbolic Toolbox> If you want ...

13 years ago | 0

Answered
Calculate displacement of a mdof sytem with ODE45?
You're definitely on the right track. Write your equations in matrix form My' = -Ky where y is the 8-element vector you describ...

13 years ago | 0

| accepted

Answered
Non-linear Simultaneous Fitting/Solution
You can treat this as a least-squares problem with 6 parameters: |a0|, |b0|, |k1|, |t|, |l1|, and |l2|. Then make your objectiv...

13 years ago | 0

Answered
how to find the number of 1 in a single column?
idx = find(all(bsxfun(@eq,x,y),2)); where |x| is your matrix and |y| is your test vector (eg |y = x(1,:)|, in your example)...

13 years ago | 0

Answered
obtaining the average value for a data set
It looks like the fourth column is what you want to calculate. If so, this will do the job, assuming that you have the first th...

13 years ago | 0

Answered
Simultaneously fit multiple data sets -- with one of the fit parameters common between all data sets.
I don't think you're far off. If you have m fits of n parameters each, with one parameter the same across all m fits, then you ...

13 years ago | 0

| accepted

Answered
Using e-mail with matlab
From the error message, it looks like your program is called |sendmail|. This is bad, because you're trying to call the |sendma...

13 years ago | 0

| accepted

Answered
Add two excel data togather
count = xlsread('file1.xls'); counts = xlsread('file2.xls'); squaredsum = (count + counts).^2; (although from your sc...

13 years ago | 0

| accepted

Answered
Required :- A simple piece of code to list the files in a dir and return the select file name as a string.
As Sean suggests, |uigetfile| provides a standard file selection dialog box. Otherwise, you can also use |dir| or |ls| to get a...

13 years ago | 1

Answered
ODE: equation solution problem
The problem is that the ODE solvers expect a function of two variables (x & y, in your case), but there's only one variable name...

13 years ago | 0

| accepted

Answered
how to use the mathmatical constant "e" in conjunction with a vector.
Your problem isn't the |e|, it's that the two parts you're trying to multiply are both vectors, hence you need |.*| instead of |...

13 years ago | 0

| accepted

Answered
Trouble Using lsqcurvefit on experimental data
You appear to be using two different definitions of the fitting function. The function you pass to |lsqcurvefit| is f_l_fi...

13 years ago | 0

Answered
Form of number
It looks as if the table's |ColumnFormat| property is set to |rat|, but that would require setting the property. It looks like ...

13 years ago | 1

| accepted

Answered
lsqnonlin problem - Where did I go wrong?
Before trying to do the optimization, try testing your function first: calibration(rand(12,1)) This gives an error (the ...

13 years ago | 0

Load more