回答済み
strange behavior with fopen
There's an inconsistency here... K>> testdata.fullfn ans = '/home/data/blah.txt' shows the single quotes around the con...

9年以上 前 | 0

回答済み
Aggregating while removing the individual data
Hmmm....there oughta' be way w/ *accumarray* in one go, but doesn't come to me at the moment how to work around the restriction ...

9年以上 前 | 0

| 採用済み

回答済み
What is missing from MATLAB?
Generic search of cell arrays for values where cell contains mixture of character and numeric data. Example >> whos faci...

9年以上 前 | 0

回答済み
I want to save the data of the rows of U that are not empty. However, since this is inside a loop, I keep deleting the data from the previous loop. How can I keep saving the data without deleting the previous one?
In most rudimentary to make work, add u=[]; % initialize before beginning the outer loop and then if ~isempty(U) ...

9年以上 前 | 0

| 採用済み

回答済み
Insert elements before a specific value in vector
Alternate ways, but a "deadahead" route is iz=[find([nan twtt(2:end)]==0) length(twtt)]; % locations except first of zero...

9年以上 前 | 0

回答済み
How can I change the marker style of only one point in a series using errorbar() fucntion and/or plot() function?
The line is a single object and therefore has only one style of whatever variety that is global to it. Plot your line by whatev...

9年以上 前 | 0

| 採用済み

回答済み
can anyone help me how to do rectangular curve fitting ? which function to use?
Taking a wild guess, perhaps the following simple demo will help.. N=50; % arbitrary number points x=randn(N,1); y=rand...

9年以上 前 | 0

回答済み
addpoints(h,x,y,z) only plots x & y values
The orientation appears to be xy by default; use the 3D rotation tool to manually orient to see the third dimensions or set view...

9年以上 前 | 0

回答済み
Display Marker for current Point in animated line
_linestyle_ and other properties are global to a line; to have a different style/marker/color/whatever apply to only a single po...

9年以上 前 | 0

| 採用済み

回答済み
Creating customized barplot for different lengths of arrays
n=100*bsxfun(@rdivide,[histc(data1,1:3) histc(data2,1:3) histc(data3,1:3)], ... [length(data1) length...

9年以上 前 | 0

| 採用済み

回答済み
why the plot curve is not smooth as the fitted curve
The supplied *plot* function that is *fit* -object aware uses an internally-determined number of points to evaluate the function...

9年以上 前 | 0

回答済み
How to plot multiple bar in one figure?
... edges=[1:5]; N=histc([dataMat1(:,1) dataMat2(:,1)],edges); bar(N,0.8) See doc for details for setting counting...

9年以上 前 | 0

回答済み
Error using histc. First Input must be a real non-sparse numeric array.
Use *cell2mat* to "smoosh" the cell arrays into one array before *histc* If have later release, there's a newer histogram fun...

9年以上 前 | 0

回答済み
Create matlab plot like the curve plot excel
Answered previously (several times, this is one of better)... <http://www.mathworks.com/matlabcentral/answers/160054-is-there-a...

9年以上 前 | 0

回答済み
Y-axis scale
Not sure the effect you're really after but set(gca,'YTick',[1 2 4 8 16 18]) which can be set(gca,'YTick',[2.^[0...

9年以上 前 | 0

| 採用済み

質問


Re-synchronizing TEXTSCAN
There are any number of questions posed for reading irregularly or segmented text files on the forum. Often the response is "us...

9年以上 前 | 1 件の回答 | 0

1

回答

回答済み
Rescale 2nd axis using yyaxis (Right Axis)
The line ylim=ax.YAxis(2).Limits aliases the builtin function *ylim* so that ylim([0.5*min(h.YData), max(h.YData)])...

9年以上 前 | 1

| 採用済み

回答済み
how to adjust data in array?
>> i1=10;i2=8; >> A=[A(1:i2-1,:); A(i1,:); A(i2:i1-1,:); A(i1+1:end,:)] A = 10 1 2 12 2 3 13 ...

9年以上 前 | 0

| 採用済み

回答済み
How can I draw two matrices in the same bar graph with same x-axis and y-axis, different colors for each matrix and with no overlapping?
bar([m;q].') for starters; see doc bar % for details on how to set colors, bar spacing, etc., etc., ... Per that ...

9年以上 前 | 1

回答済み
more efficient way of checking if conditions are satisfied?
Try something like concur={'no' 'yes}; % table of concurrence answers ref=[phi C A]; ...

9年以上 前 | 1

| 採用済み

回答済み
Why are errorbar ticks exaggerated when using log scale on the X axis?
_"Why?"_ 'Cuz they're drawn as a given length that is percentage of x value which, in log coordinates aren't symmetric nor ne...

9年以上 前 | 0

| 採用済み

回答済み
how to read large txt files in block
Pretty straightforward use of *textscan* with a *while* loop to find the sections-- >> fid=fopen('file.txt','r'); % ope...

9年以上 前 | 0

| 採用済み

回答済み
Insert string into cell array beside data
You can build character string sequences by memory manipulation just the same as numeric ones: >> c='RCL'; ...

9年以上 前 | 0

回答済み
Error using / Matrix dimensions must agree.
global nat tempiniz mass is _very_ bad inside the function; you can screw up what they are too easily. Make them arguments...

9年以上 前 | 0

回答済み
Can someone show me how to find the slope of the curve created by the data below between the 3rd y value and the 31st y value.
plot(X,Y) hold on plot(X(3:end),Y(3:end),'*') b=polyfit(X(3:end),Y(3:end),1) yHat=polyval(b,X); plot(X,yHat,'r-...

9年以上 前 | 1

回答済み
Hot to solve an assignment error: assignment A(:) = B during coding
Your error is somewhere not shown; the above code will work as is...not very "Matlab-y" implementation but doesn't cause the err...

9年以上 前 | 1

回答済み
i want to store elements in matrix and call number wise but there call in workspace it seems undefined function and consider only last entry
mask=8:-1:1; parent=bsxfun(@bitget,entry,mask); *NB:* Your logic for >1 is in error unless you don't want to report the...

9年以上 前 | 0

回答済み
Hi every one , I need to construct a binary Array such that each time i can add another cell to it ? as shown in the code below .,, but i got an error
Two of many ways... >> D(2,:)=[0 0 0 0 1 0 1 0]; % have to make room for the vector in second dimension... Alternativel...

9年以上 前 | 0

| 採用済み

回答済み
Matlab doesn't release memory when variables are cleared
It has more to do with Windows and how its memory-management routines work (or not) regarding what memory that is marked as unus...

9年以上 前 | 0

| 採用済み

回答済み
Reading specific range from multiple sheets in Excel
Use *xlsfinfo* to return the list of sheets in the workbook and iterate over the returned cellstr array.. excFile='myExcel....

9年以上 前 | 1

| 採用済み

さらに読み込む