Answered
Encoding problem with MATLAB help documents
Try going to File -> Preferences -> Fonts -> Custom -> Help Navigator and see what the setting is. Maybe it's some kind of lo...

15 years ago | 0

Answered
Requires matlab help over skype to complete this question. please help!
As well as Oleg's link, some others that may be of use: <http://www.mathworks.com/academia/student_center/tutorials/register....

15 years ago | 0

Answered
paramteric 3dplot
Can you explain more thoroughly what your difficulty is? t = linspace(0,2*pi); a = 0.3; b = 2; r = rand; z = a*t; ...

15 years ago | 0

Answered
ode45 function
I think the problem is with |fff|. When you say |fff| has the same number of elements as |t|, how many is that? The number of ...

15 years ago | 0

Answered
Different kind of normalization
If you have Statistics Toolbox, use |uhat = zscore(u)|.

15 years ago | 0

Answered
Quadrature, midpoint
A few things right off the bat: # syntax error in your |for|-loop # you don't need a |for|-loop -- just make a vector of the x ...

15 years ago | 0

Answered
Matlab nonlinear regression
You need to make a function of two variables |b| and |V|. The three elements of |b| are the three unknowns |lx|, (n+q), and |Vx...

15 years ago | 0

| accepted

Answered
How to plot this function?
Take a look at <http://www.mathworks.com/help/matlab/ref/erfc.html erfc>. A simple change of coordinates should get you there. ...

15 years ago | 0

Answered
solve nonlinear equations
Believe it or not, you didn't put a space before the constant in the 3rd and 4th elements of |F|. Notice that they both end in ...

15 years ago | 0

| accepted

Answered
Loops in Matlab
When you say dataset, I take it that you don't mean a dataset array. So: x = (Day2(:,1)==50.3779)&(Day2(:,2)==-4.1227); Ac...

15 years ago | 0

Answered
How do I color an area between 3 graphs ?
Something like this? function [meanRandLike] = Like_Conf(meanRandLike) s=sort(meanRandLike,2); bounds = prctile(s',[2...

15 years ago | 1

Answered
How do you write an excel sheet, and add input to it everytime program is ran?
Brute-force approach [~,~,C] = xlsread('file.xls'); <do stuff to create new data> <make cell array C2 out of new data> ...

15 years ago | 0

| accepted

Answered
skip a load error
You can use <http://www.mathworks.com/help/matlab/ref/exist.html |exist|> to check if the file exists, but perhaps another appro...

15 years ago | 0

Answered
Help vectorize for loop please
As far as I can tell, this seems to replace your code and is a tiny bit faster. (I tested only on small arrays, so maybe the sa...

15 years ago | 0

| accepted

Answered
Execution of code ends prematurely
This isn't the cause of the problem, but first: n_cutfit2 = size(co...,2); coeffs = zeros(n_cutfit2,10) for k = 1:n_c...

15 years ago | 0

Answered
I need to write a function MySolve
function [x,converged]=MySolve(f,xo,tol,maxit) opts = optimset('MaxIter',maxit,'TolFun',tol); [x,~,converged] = fsolve(f...

15 years ago | 1

Answered
Help vectorize for loop please
You don't need a loop at all -- all your statements inside the loop will work as vectorized statements with virtually no modific...

15 years ago | 1

Answered
all possible combinations of variables
I don't think there's a simple function that will do anything like this, so I suspect you'll have to brute-force it: R2 = 0...

15 years ago | 0

Answered
Matlab poisson random numbers
Any discrete distribution has a nonzero probability of producing repeats. If you don't want repeats then you're not sampling fr...

15 years ago | 0

Answered
robustfit error
I'm guessing that the NaN thing is a red herring -- I think that's just where the error happens to be thrown (ie some general ch...

15 years ago | 0

Answered
shape similarity between two signals
If the signals have different time bases, you'll have to align them first, then use |corrcoef|. To do that you could use either...

15 years ago | 0

| accepted

Answered
Lat / Long and Elevation Data - Seabed survey - Surface Plot
This seems to be the question du jour. If the data is actually on a grid, you should just be able to |reshape| your vectors int...

15 years ago | 1

| accepted

Answered
2D plot with 3D data
You want a contour plot? Given that it sounds like you have vectors of data: % Make some fake data x = rand(256,1)*4-2; ...

15 years ago | 0

Answered
uniformly distributed coordinate points
xmin = -3; xmax = pi; npts = 42; x = xmin + (xmax-xmin)*rand(npts,1); Repeat for |y|.

15 years ago | 0

Answered
What is the correct syntax to label Xticks with data from a cell array
x = 1:length(A); bar(x,A) set(gca,'XTick',x,'XTickLabel',B)

15 years ago | 0

Answered
Importing a excel file with inconsistent row length, amount of columns, and blank cells.
You can read in a cell array of all Excel cells using |xlsread|: [~,~,raw] = xlsread('file.xls'); You can also specify a...

15 years ago | 0

Answered
While Loop wont calcuate my harmonic mean?
|total| starts at 0, but then you have |total=(1/total)+...| That line should be |total = total + (...)| anyway. BTW, I'm assu...

15 years ago | 0

| accepted

Answered
Using fsolve in a loop
This seems a bit confused... why are you using |feval|? You should be able to just evaluate the function handle |fun| at the gi...

15 years ago | 0

Answered
HELP! Reading a probability from a CDF plot
You basically want an inverse CDF calculation (based on measured data, rather than a formula)? % Make some fake data x = -4...

15 years ago | 0

Answered
Matlab delete values
Much as I love logical indexing, here's a case for using |find| with the number and |'first'| or |'last'| option: idx = find(...

15 years ago | 0

| accepted

Load more