Answered
i am trying to avoid current value of row and column and multiply the rest of column element?
>> A11 = prod(H(1,1:size(H,2)~=i & H(1,:)~=0)) ans = 2 >> Not sure what role _j_ is supposed to play...

10 years ago | 0

| accepted

Answered
Bad property value found
_'Orange'_ is not one of the named colors; only one of the eight _'yellow', 'magenta', 'cyan', 'red', 'green', 'blue', 'white', ...

10 years ago | 0

| accepted

Answered
How to extract information from matrix?
R=B(1,:); C=B(:,2); Read and work through the <http://www.mathworks.com/help/matlab/getting-started-with-matlab.html "Ge...

10 years ago | 0

Answered
How can I have smaller squares than 'grid minor' in the plot?
Must have the Symbolic Toolbox; not sure if there's a release issue as to when the functionality was introduced; current documen...

10 years ago | 0

Answered
How do I export data from plotted graph to excel?
doc xlswrite NB: You'll do better if at all possible to wait until you've got all the data before writing a file; sequenti...

10 years ago | 0

| accepted

Answered
Even degree order exact polynomial equation/function for the curve fitting Data
Coefficients will be in the output structure curve.p.coefs which will be a Nx4 array of cubic polynomial coefficients fo...

10 years ago | 0

Answered
How to add bounds to a bar graph?
Not sure what you mean, precisely, but try subplot(3,1,1) bar(R11) hold on hE=errorbar([1:length(R11)],R11,t*ones(...

10 years ago | 0

| accepted

Answered
minimum of the matrix
i=0:10; f=i.^2-10.*i+2; [fmin,imin]=min(f); % minimum to nearest integer value To solve for the minimum, couple of w...

10 years ago | 0

| accepted

Answered
File is all numeric, but csv read does not work fully
OK, to separate from the long-winded chain of comments...this isn't the full answer yet, but a "getting-started" for *textscan* ...

10 years ago | 0

Answered
How to edit my scatter plot legend?
Need to save the line handles from *plot* and select one from each group. Each group (column) of points in the plot is a separa...

10 years ago | 0

| accepted

Answered
sort a vector with its corresponding names/labels
Use the optional second output from *sort* and arrange the _names_ array using it... [values,isort]=sort(values); names=...

10 years ago | 0

| accepted

Answered
How do I plot two categories of numbers related to to the y-axis, with the x-axis in the form of a bar graph.
Something like >> A=rand(9,1); B=rand(1); >> scatter(ones(size(A)),A,'filled') >> hold on >> scatter(2,B,'filled',...

10 years ago | 0

| accepted

Answered
Repeating blocks of N rows M times
Or, >> [repmat(A(1:N-1,:),M,1);repmat(A(N:end,:),M,1)] ans = 1 2 3 1 2 3 4 5 6 ...

10 years ago | 1

Answered
nested loop in for loop
See the various solutions provided at <http://www.mathworks.com/matlabcentral/answers/80508-create-a-moving-average#answer_902...

10 years ago | 0

Answered
Passing variables to plot function
Well, it would seem pretty straightforward, plot(d1,d2,'lineWidth', 40); assuming X, Y values are in d1, d2, respectivel...

10 years ago | 2

Answered
how to get correct value on division in matlab
>> 60/88.8888888888889-4*eps(ans) ans = 0.674999999999999 >> Can't expect FP precision to be the same between Matlab...

10 years ago | 1

Answered
How do I get the max value within a specified range on my plot?
Use the sampling frequency to find the locations with which to bound the search -- HiLo=[100 300]; % frequency bounds...

10 years ago | 0

| accepted

Answered
create large matrix from data
Just expand the output by rows is the "braindead" solution...assume the given array is _dat_ Nrow=size(dat,1); % the numbe...

10 years ago | 0

| accepted

Answered
how to count number of zeros in each row and column?
You're not tryin'... >> sum(~A,2) ans = 2 4 3 4 >> sum(A==0) ans = 2 2 2 3 ...

10 years ago | 0

Answered
How to generate random numbers between -pi and pi
help rand ... Example 1: Generate values from the uniform distribution on the interval [a, b]. r = a + (b-a)...

10 years ago | 3

| accepted

Answered
Extracting rows from csv file which contain only certain text
doc strfind NB: there's no specific reason to make a new file unless you have other reasons besides doing the analysis; ju...

10 years ago | 0

Answered
curve fitting non-linear data with a logarithmic distribution
Matlab has no implementation specifically, transform your frequency vector to log10(f) and fit; to evaluate you then also must u...

10 years ago | 0

Answered
After using fitdist(___ ,'normal') what do the terms mu and sigma refer to??
>> x=randn(10,1); >> n=fitdist(x,'normal') n = normal distribution mu = -0.194848 sigma = 1.14136 >> [mean(x)...

10 years ago | 0

Answered
how can I convert c codes to Matlab code?
No automated tool exists afaik. You'll have to analyze the C code and rewrite the algorithm in Matlab. If it's a very involved...

10 years ago | 0

Answered
How do I remove leading digits in a .CSV
If you have recent release which includes the *datetime* class, then read it as a date with the _D_ format descriptor. "DDD" is...

10 years ago | 0

Answered
"Subscripted assignment dimension mismatch in for loop
Because since _xx_ is a vector, the RHS is a vector of length(xx) with the individual terms modified by the specific constants r...

10 years ago | 0

Answered
I have a CSV file with date and time values I want to import and convert to datetime
Use t = datetime(DateStrings,'InputFormat','M/d/y h:mm:ss a'); instead. 'MM' --> Months and 'SS' --> fractional seconds ...

10 years ago | 0

| accepted

Answered
Plotting 2 data points with error bars in different colors
Can't set them indendently with one *errorbar* handle as they're one line object for the points and another composite group for ...

10 years ago | 0

Answered
how do I control Axis Location from bottom and left to become in the middle?
See _[X|Y]AxisLocation_ property at <http://www.mathworks.com/help/matlab/ref/axes-properties.html <axes-properties>>. Specifi...

10 years ago | 0

Answered
Replace a zeros row with one under a condition very important for me
On the first, I know there is a submittal on File Exchange to count runs; I think it _may_ be from Bruno Luong...but, consider w...

10 years ago | 0

Load more