回答済み
My data consists of different years(1982, 1987, 1992, 1997 and 2002) which are not in the sequence, and each of the years have different prices and quantities. How can I compute the total (sum and mean) price and quantity of each year.
Presuming a recent release, use the *table* type and grouping variables... <http://www.mathworks.com/help/matlab/matlab_prog/...

約10年 前 | 0

| 採用済み

回答済み
plotting the power spectrum density
There's a good example at doc fft

約10年 前 | 0

回答済み
Error bars added to column plot instead of regular line plot, and stacked 2x2
Would be worth a search on File Exchange to see if somebody has submitted a function, but-- It's somewhat of a pit(proverbial...

約10年 前 | 1

| 採用済み

回答済み
how to find a common part of the strings?
The most trivial is that the part thru the second underscore is the same so use that fact... ix=strfind(str,'_'); % t...

約10年 前 | 0

回答済み
How to read .raw files of unknown number of rows and 9 columns
fid=fopen(... while ~feof(fid) v=cell2mat(textscan(fid,'%f',9,'collectoutput',1)); % do whatever with _v_ here ...

約10年 前 | 1

| 採用済み

回答済み
Multiple x-axis for a single plot
Maybe shoulda' searched the documentation first... :) <http://www.mathworks.com/help/matlab/creating_plots/graph-with-multipl...

約10年 前 | 0

回答済み
Excel equation to Matlab translation????
R=0; if sum(E) d=E-C; % temporary difference R=sqrt(dot(d,d)/51); end or R=sqrt(sum((E-C).^2)/51); ...

約10年 前 | 0

回答済み
How to divide the space under a normal probability density function (pdf) into equal probable intervals?
>> p=[0:0.10:1].'; >> mu=2; sigma=1; >> x=norminv(p,mu,sigma); >> disp([p x]) 0 -Inf 0.1000 0.7184 ...

約10年 前 | 0

| 採用済み

回答済み
Averaging multi-dimensional arrays across several dimensions at once
Only thing that comes to me at the moment is to use a temporary... mX=X(1,1,:,:,:); mX=mean(mX(:)); it _might_ help a...

約10年 前 | 2

回答済み
Why is this code not allowing me to save a text file using Matlab?
What's wrong with your code is you didn't test the return value from *fopen* before trying to use the result...maybe you're tryi...

約10年 前 | 0

回答済み
To RESHAPE the number of elements must not change?
All the code is superfluous and a red herring to wade through excepting for the function containing the error.. function [I...

約10年 前 | 0

回答済み
How to set the step size in z axis?
To keep the autoranging limits if they're ok and using a tick spacing of 100, but you want 200, simply ztk=get(gca,'ztick')...

約10年 前 | 0

回答済み
How to use textscan to properly read a csv file?
Well, you don't say which columns, but it's simple enough...and actually, if after the header/text lines it is all numeric then ...

約10年 前 | 1

回答済み
Datenum comparison not behaving
Bad input format string... 'MM' is minutes, 'mm' is months... >> datenum('20160113','yyyymmdd')<datenum('20160512','yyyymmd...

約10年 前 | 0

回答済み
Problem when extracting data from string array!
... row_one=strcmp(data_text(1,:),''); row_one=data_text(1,~row_one); You're searching for an empty character in the ...

約10年 前 | 0

回答済み
How to plot a single data point at a specific location?
Alternatively, stairs(x,y)

約10年 前 | 0

回答済み
Fastest way to have a matrix with intersected elements only between matrix and array
Close >> a.*ismember(a,v) ans = 0.1000 0 0.3000 0.3000 0.5000 0 0 0.1000 ...

約10年 前 | 0

回答済み
I have a matrix A=[M;N;O] where M,N and O are also matrix of 7*7 .How should I multiply these type of two matrix which cantains matrix as an elements it self?
'Pends on what kind of multiplication you mean...element-wise or matrix. C=A.*B; % element-wise size(C)==[21,7] C=A*B.'...

約10年 前 | 0

回答済み
Is there a way to know from fig file which code file created it?
No. Bestest you can do is create a script file that will reproduce the figure from the internal data, but it wouldn't be able t...

約10年 前 | 0

回答済み
Parsing Strings with Values Missing
Actually, since the values are regularly spaced, simply create a format string for the ones you want...I picked the first and th...

約10年 前 | 0

| 採用済み

回答済み
How to read string/numeric line from file, and parse out one number?
Many ways, one would be ... fmt=['%*f %*s' repmat('%*f',1,3) '%f']; % skip number/string/3numbers, read value v=ce...

約10年 前 | 0

| 採用済み

回答済み
Xtick location is not correct
You'll have to set the two axes xlim ranges to a consistent set of ticks and range. It's difficult to interpret but I guess bot...

約10年 前 | 0

回答済み
transpose of a complex array
See doc transpose I've always thought it peculiar too, that TMW chose the "dot" version for the array transpose and the ...

約10年 前 | 1

回答済み
plotting 4 variables in same graph
plot(sd,[h;sa;a].') legend('H','SA','A') xlabel('SD') Finish 'salt to suit'...

約10年 前 | 0

| 採用済み

回答済み
How to use different markers for different X,Y pairs?
Can't use the named names multiple times in the same call, per the documentation: _"Property name-value pairs apply to all the l...

約10年 前 | 0

回答済み
Add dimension to YTickLabel
Use *text*. You'll have to 'spearmint to find the proper coordinates hT=text(1.75,1.03E6,'[GWh]'); looked pretty close...

約10年 前 | 0

回答済み
Problem with importdata, unable to open file.
For reasons only known to Gates and Allen, MS *dir* returns the two '.' and '..' entries which aren't files (nor anything else u...

約10年 前 | 0

| 採用済み

回答済み
How to rename files in a batch process using arrays?
movefile(Paper %.doc,Oldsequence(i),Paper %d.doc,newsequence(i)); is illegal syntax, the '%' sign introduces a comment in t...

約10年 前 | 0

| 採用済み

回答済み
vectorization of piecewise defined function
Well, as homework it's not kosher to just provide the solution; that does you no good in learning... HINT: type doc 'lo...

約10年 前 | 0

さらに読み込む