回答済み
How to write a condition ?
Can't. Comparison operations always return logical 0 (false) where A or B have NaN elements. Best you can do is test if resu...

約9年 前 | 0

回答済み
read the size of cell array with the same element
[u,iu]=unique(c{:},'rows'); n=histc(iu,1:length(u));

約9年 前 | 0

回答済み
Increase gap between XTick and XTickLabel
Tick labels are a 1:1 correspondence with the tick in sequence; the labels don't know about location; only ordinal number. Use ...

約9年 前 | 1

| 採用済み

回答済み
Calculating velocity and acceleration from existing data
No looping needed; "Use the vectors, Luke!" in Matlab--that's its real advantage and you don't have to duplicate all those forum...

約9年 前 | 2

回答済み
How to truncate a time series to 20.000 points?
Don't know how you're getting the data, but if it is just a chosen length in number of elements (points), then simply data=...

約9年 前 | 1

| 採用済み

回答済み
Reading a Matrix with operator and Cell Array from Excel
# *xlsread* reads the _value_ of the cell, not the underlying functional in the cell, if there is one. # An Excel spreadsheet c...

約9年 前 | 0

| 採用済み

回答済み
How to sort a matrix based on two columns
>> sortrows(A,[1 3 2]) % doc sortrows for details... ans = 1 3 10 1 1 20 1 2 ...

約9年 前 | 9

| 採用済み

回答済み
remove duplicated rows from a cell array ?
Sans the orientation (and not sure you can ensure the data are all symmetric to keep the square array?) >> [u,ix,ib]=unique(...

約9年 前 | 0

回答済み
Use of a specific field of a structure.
_"How can I define/express the "appropriate" field of the structure x?"_ That all depends on what the fields in structure _x_...

約9年 前 | 1

| 採用済み

回答済み
How to let a script use a variable from the workspace.
Turn it into a function instead...it would also be more generic to pass the file name as well... function YourFuncNameHere(...

約9年 前 | 2

| 採用済み

回答済み
Open new notepad and insert some text without saving it in file
No klew how well it works, but... <https://notepad-plus-plus.org/community/topic/10651/update-activex-plugin-1-1-7-3 <notepad-pl...

約9年 前 | 0

回答済み
How can I plot a graph with one series but different colors depending on another data ?
A line is a single color (limiting, I know, but true :( ) so to have different colors along the length of a line you'll have to ...

約9年 前 | 0

| 採用済み

回答済み
Approximately equal sign in matlab plot
Get pretty close approximation (so to speak :) ) that way... hAx=axes; xlim([0,27]) set(hAx,'xtick',[0 15 25]) hT=...

約9年 前 | 1

回答済み
Removing the line number from a numerical matrix
The obvious answer would be this isn't the same code as you ran previously. There's nothing in this code that would do anything...

約9年 前 | 0

回答済み
How to get a smooth curve using plot in matlab
'spline' goes through the points given and uses a spline to fill in between. Perhaps you're looking for "smoothing spline". ...

約9年 前 | 0

回答済み
Different Colour for Candle
Well, the doc says _"(Optional) Candlestick color is specified as a character vector."_ which would indicate you can with just a...

約9年 前 | 0

回答済み
Creating time series vectors of unequal duration
One _possible_ interpretation... >> inear=interp1(a2,1:length(a2),a1(end),'nearest'); >> a3=[a2(1:inear-1) a2(inear):2:a...

約9年 前 | 1

| 採用済み

回答済み
How do I fix my legend?
There's only one legend per plot; you're overwriting each pass thru the loop. for k=1:m scatter(x(:,k),y(:,k)) if...

9年以上 前 | 0

| 採用済み

回答済み
Creating time series vectors of unequal duration
_"... a3 should have a start point of a1(1) and an end point of a2(end) with an increment of 2."_ a3=[a1(1):2:a2(end)]; % ...

9年以上 前 | 0

回答済み
Unsatisfying 2nd order fit - fitlm
W/o the data itself can't really tell, but certainly doesn't appear that the plot is the actual LS quadratic for the data given,...

9年以上 前 | 1

| 採用済み

回答済み
How to display all values of uint32 array in variable browser?
Answered your query in the newsgroup <https://www.mathworks.com/matlabcentral/newsreader/view_thread/348526 <view_thread/348526>...

9年以上 前 | 0

回答済み
How to merge two different datasets sharing only one variable into a new one without using for-loop?
u=unique(data1.secid); % those in dataset 1 new=data(ismember(data2.secid,u),:); should do it providing you don't run in...

9年以上 前 | 0

| 採用済み

回答済み
Hello; Can someone please help me matlab doesn't plot my excel data it show the axis only I am trying to make spectral analysis.i have attested the excel file and code as well.
filename = 'datacollect2.xlsx'; N = length(filename); fs = 400; fnyquest = fs/2; num = xlsread(filename); y = ...

9年以上 前 | 0

| 採用済み

回答済み
How to optimise bar chart display?
Hmmm....that is a failure in the internal scaling algorithm fur shure...easy enough to fix, though; bar axis center values for d...

9年以上 前 | 0

| 採用済み

回答済み
Use low-level functions (not imread.m) to read an grayscale image
See <http://www.npes.org/pdf/TIFF-v6.pdf <TIFF-v6>> for structure... *ERRATUM:* Corrected link -- dpb *ADDENDUM* _"I t...

9年以上 前 | 0

回答済み
Error using variable in a function with trial version
function [matrice] = SelectionSept (matrice) for i = length(date):-1:1; ... |*date*| isn't defined in your func...

9年以上 前 | 0

回答済み
Why would csvread read all data into a single column
Expanding upon the above comments, I did a test that looked like-- N=1E6; % the long row le...

9年以上 前 | 0

回答済み
How can I convert all files to txt?
To consider any file as simply a stream of bytes (char), write dat=fread(fid,inf,'*char'); What this ignores with specia...

9年以上 前 | 0

回答済み
Piecewise Polynomial fitting for data
Fitting a polynomial is probably not going to work all that well and certainly a fifth-order one is likely quite unstable. W/...

9年以上 前 | 1

回答済み
How to properly extract data from text file.
The first one is (relatively) easy -- you set _'ReadVariableNames',true_ whose meaning per documentation is "the first row of th...

9年以上 前 | 0

| 採用済み

さらに読み込む