回答済み
How to show the values are constant inside a cell array
Presuming interpreted the meaning of "constant" in each cell, >> c{:} % small demo cell array first,last ...

8年弱 前 | 0

回答済み
How can I plot a Pareto Chart (Y-axis= Qty VS. X-axis = Part Description) for the attached Excel data table?
A={1 30 'ARD'; 2 25 'CDE'; 3 22 'BTS'; 4 10 'RSD'; 5 5 'TSE'; 6 4 'DMP'; 7 3 'MTR'; ...

8年弱 前 | 1

| 採用済み

回答済み
Calculate error bar and plot them
<https://www.mathworks.com/matlabcentral/answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center#answer_302325 Answer...

8年弱 前 | 1

回答済み
how to remove image extension so that only numbered name can be stored in a database
n=sscanf(fname,'%d.jpg') or [~,name]=fileparts(fname); n=str2num(n);

8年弱 前 | 0

| 採用済み

回答済み
I have a time series daily data points from Jan-1-2007 to March-31-2011 which is 1642 data points. How to plot the CDF of the same?
Because |ecdf| returns the percentiles at the _*unique*_ locations in the input vector returned in the optional second output va...

8年弱 前 | 0

| 採用済み

回答済み
Spliting a n-by-3 Array into several different arrays.
|v| is _not_ a vector but an array. Star's code works on a vector; would be painful to extend to an array I think, as is. _B...

8年弱 前 | 0

| 採用済み

回答済み
Repeat for-loop from the beginning after recalculating values
Directly addressing the Q?, here's a basic function to do the removal-- function x=thompsontau(x) % Return array x w/ ou...

8年弱 前 | 0

| 採用済み

回答済み
how to specify the X and Y ticklable?
|X,YTick| and |X,YTickLabel| are integrally coupled together -- you must label every tick with a label (or a blank string if don...

8年弱 前 | 0

回答済み
How to animate line on polar axes plots
polar coordinates are "red-haired stepchildren" in Matlab, for sure. I've not played with the new(ish) |PolarAxes|, but I t...

8年弱 前 | 1

| 採用済み

回答済み
Repeat for-loop from the beginning after recalculating values
The first loop can be eliminated entirely--use the Matlab array syntax: x_31=mean(P31,'omitnan'); SDP_31=std(P31,'om...

8年弱 前 | 0

回答済み
How to avoid using dynamic variables?
Good on ya' to recognize the futility of the approach! :) See doc splitapply for the general utility function to ap...

8年弱 前 | 0

回答済み
2 different markers in loop, show both when applicable
if isequal(VEI4lat,[0]) == 0, is equivalent to if VEI4lat~=0 and the block is empty so nothing ever happens for any...

8年弱 前 | 0

| 採用済み

回答済み
Add secondary semilogx axis to linear plots
OK, I _think_ this is close if I understood correctly... % make up some dummy data that sorta' looks similar... phi=-2:2...

8年弱 前 | 1

| 採用済み

回答済み
Insert xticks in bold in existing xticks
You've got to write the same number of tick labels as ticks and place the non-automatic text in the locations desired, explicitl...

8年弱 前 | 0

回答済み
Row-by-row analysis after establishing a threshold value
A=[0.55 0.45 0.55;0.65 0.75 0.85;0.35 0.95 0.45;0.85 0.15 0.25;0.35 0.25 0.15;0.45 0.45 0.35]; T=0.5; iUnOv=all(A<T,2) |...

8年弱 前 | 0

回答済み
I'm getting the following error when I try to run some function m-files: Undefined function or method 'eig' for input arguments of type 'intval'.
>> doc eig ... Input Arguments A — Input matrix square matrix Input matrix, specified as a real or comple...

8年弱 前 | 0

| 採用済み

回答済み
How do I remove paired data in a matrix?
A(any(A<0,2),:)=[]; Or, vice versa, keep the wanted-- A=A(all(A>=0,2),:); % keeps 0 as +ive Look up |logical ind...

8年弱 前 | 1

| 採用済み

回答済み
Is there a (convenient) way to find out which Toolbox you need for code written by somebody else in the past?
Unfortunately, "no, not really". One of the real problems in MATLAB design is namespace pollution and with the tremendous proli...

8年弱 前 | 0

回答済み
Concatenate variables from multiple files to just one single matlab file
d=dir('station*.mat'); % return the list of files n=length(d); % number files...

8年弱 前 | 0

回答済み
Adding values of each element of cell array
Don't "double-up" cell indexing; makes dereferencing much more complicated than need be... Define x as x{1,1}=[0.8,1.4];...

8年弱 前 | 0

| 採用済み

回答済み
How to pull out numbers after specific string in txt file?
That's a complex file and there are, it appears, multiple sections; you'll have to decipher just how to determine which one is t...

8年弱 前 | 0

回答済み
Push button for open tecplot
I haven't used TecPlot in years, but there are quite a lot of things it can do that would be extremely difficult to do in Matlab...

8年弱 前 | 0

回答済み
How to store each iteration value and plot it ?
Preallocate for |L2| and keep and increment an index inside the loop and store into an array L2=zeros(N,1); ...

8年弱 前 | 0

| 採用済み

回答済み
Filling an area between max and minimum lines on a plot
See if <https://www.mathworks.com/matlabcentral/answers/414852-how-to-plot-an-area-limited-by-two-functions#answer_332770 Answer...

8年弱 前 | 1

| 採用済み

回答済み
Error using xlim for datetime values
OK, I answered in couple of comments, but they're buried so will post (yet another :) ) Answer to the original problem only. ...

8年弱 前 | 1

回答済み
Calculations for arrays inside an array
Making the array content cell arrays complicates dereferencing but something like structfun(@(c) mean(c{:}(:,5)-c{:}(:,4)),...

8年弱 前 | 1

回答済み
Specify wich values appear on a plot legend
Use the handles of the lines you wish to add legends to... nFig=8; % set the numbers via variables n...

8年弱 前 | 0

| 採用済み

回答済み
How do I import numerical entries from an excel sheet as strings?
opt=detectImportOptions('testmatlabpartnumberreadin.xlsx'); % see what Matlab thinks opt.DataRange='A1'; ...

8年弱 前 | 1

| 採用済み

回答済み
Determining the max angle from the cell array
A cell array just gets in the way here. I'd look back at how the Ang_F1 is generated and see if can't just get the array direct...

8年弱 前 | 0

さらに読み込む