回答済み
Save each loop values, without overwriting
for j=2:25 QQ=MND(:,j-1); %m3/s Vector containing fixed nodal discharges with each PF [Y,Df,Q,VK1,Vn1]=funF2(H,QQ,MT...

10年以上 前 | 0

回答済み
Assigning a variable to any value in a matrix
Matrix = [0 1 4; 4 1 3]; for x = 1:10 if any(x+Matrix(:)==5) ... *NB:* use of *:* to treat array as a vector...

10年以上 前 | 0

回答済み
ismember function and find function in the matlab is not responding for some values? Please check this issue and guide me..Only for 3.3500 value is is giving 0 answer.
See the FAQ topic <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F <Why is 0.3-0.2...

10年以上 前 | 0

| 採用済み

回答済み
What is meaning of c(:,1) and . in matlab code
See <http://www.mathworks.com/help/matlab/learn_matlab/matrices-and-arrays.html <learn_matlab/matrices-and-arrays>> and <http:/...

10年以上 前 | 1

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 2

回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 3

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
"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年以上 前 | 0

さらに読み込む