回答済み
How to find indices of non duplicate rows in a matrix?
>> A = [1 1 2 2 3 4 5 6 6]; >> [n,b]=histc(A,unique(A)); >> A(ismember(b,find(n==1))) ans = 3.00 4.00 ...

5年以上 前 | 0

| 採用済み

回答済み
error converting chars to string
You've previously defined Samples as a cell array (either deliberately or by accident) -- >> Samples={} Samples = 0×0 empty...

5年以上 前 | 0

回答済み
Splitting data array into sub arrays
>> SIC=[3301, 4502, 3306, 4602, 4510].'; >> splitapply(@median,SIC,findgroups(fix(SIC/100))) ans = 3303.50 450...

5年以上 前 | 1

| 採用済み

回答済み
Adding a second x-axis to each plot in a tiled layout / subplot
The tiled layout object is documented as "A tiled chart layout contains an invisible grid of tiles that covers the entire figur...

5年以上 前 | 0

回答済み
cell to matrix in matlab
>> X=[{[[2:2:10].' rand(5,1)]},{[[1:2:10].' rand(5,1)]}] X = 1×2 cell array {5×2 double} {5×2 double} >> [X{1}(:,...

5年以上 前 | 0

回答済み
Input only numbers from .txt file and store numbers
It would be better to write a more parseable text file, at least with a delimiter if not multiple records... With just highleve...

5年以上 前 | 0

回答済み
How to iterate through the alphabet like Excel does
function rnge=xlsAddr(row,col) % Build Excel cell address from row, column % % RNGE=XLSADDR(ROW,COL) will return an Excel cel...

5年以上 前 | 0

| 採用済み

回答済み
selecting values between vectors and plot the values
isA=(Ax>Bx); ABx=Bx; ABx(isA)=Ax(isA); plot(ABx,max(Ay,By))

5年以上 前 | 0

回答済み
FindPeaks() of a 1024 x 116 Matrix
findpeaks only works on vector input; just use a loop and pass each column of your array in turn. There's a fair amount of back...

5年以上 前 | 0

| 採用済み

回答済み
How to separate weekends from weekdays from an Excel file in MATLAB?
Well, ya' gotsa' start somewhere! We all were newbies once...give it a shot and see how far you get on your own first... Impor...

5年以上 前 | 0

| 採用済み

回答済み
extract or split data from one column in table into several columns
>> s='250ms,500ms / 95, 101, 106, 107 / Avg: 11_right / | bl | _HLG_MLD | (9) vs. Avg: 11_right | bl | _CG | _LOW (8) / FCL';...

5年以上 前 | 0

回答済み
Delete data in one table, based upon another table
It would be easier to write working code if we knew the actual format of the variables -- is it really a MATLAB table object or ...

5年以上 前 | 0

| 採用済み

回答済み
How can I duplicate the array data into a fixed number?
No, you don't have to have the same number of points in both lines to plot them on the same axes. Use plot(x1,y1,x2,y2) or p...

5年以上 前 | 0

回答済み
if any command to check table values
We don't have the data and can't see the actual result in context -- although the code snippet posted isn't formatted well, that...

5年以上 前 | 0

回答済み
extract numbers form a column
v=sprintf('%d',double([nan;Q(:,1);nan].'==0)); iStrt=strfind(v,'01').'; iEnd=[strfind(v,'10')-1].'; grpsums=arrayfun(@(i1,i2)...

5年以上 前 | 1

| 採用済み

回答済み
Conditional average (need help with speed)
Grouping variables and rowfun to the rescue... tMeans=rowfun(@(x),mean(x,'omitnan'),mytable,'InputVariables','T','GroupingVaria...

5年以上 前 | 0

| 採用済み

回答済み
monts in year sequence, string, matrix
Add the date to a timetable and retime with aggregation-- tt=timetable(datetime(yr,1,1:365).',data); % make timetable of d...

5年以上 前 | 1

回答済み
How do I changethe label in a compass graph
Well, the above code commented out pax=gca; so the handle to the axes is either undefined or refers to a probably no longer ex...

5年以上 前 | 0

回答済み
What kind of multiplication is going on here?
The degenerate case of a 1x1 matrix IS a scalar and so '*' reverts to scalar operation. It would be simply too inconvenient i...

5年以上 前 | 1

| 採用済み

回答済み
Loop for randomisation assignment in table columns
From above modifications of IA's original using the idea of a lookup table instead of loop... % set path to where the session 1...

5年以上 前 | 1

| 採用済み

回答済み
Calculating discharge over multiple years
Use a table or timetable and rowfun with grouping variables...a couple lines of code and an anonymous function will do it. Fo...

5年以上 前 | 0

| 採用済み

回答済み
Drop a column from a matrix if one number in that column is less than 30
VAL=30; % don't bury "magic numbers" in code; use variables bigMatrix=bigMatrix(:,all(b...

5年以上 前 | 0

| 採用済み

回答済み
Loop for randomisation assignment in table columns
% prepare lookup table first... ROWS=cellstr(char('WE', 'BC', 'CCC', 'LB', 'RO', 'NN')).'; ROWS=categorical([ROWS;ROWS([4 5 1 ...

5年以上 前 | 0

回答済み
How do I present an audio signal in a time domain plot using MATLAB, such that the y-axis is in decibel (dB) instead of of a linear scale?
See the attached link https://www.dsprelated.com/freebooks/mdft/Decibels.html In particular, note that "Signal intensity, power...

5年以上 前 | 0

| 採用済み

回答済み
extract elements from signal
Don't create new variables, just x=reshape(x,1000,[]).'; and reference the column of interest. If you create new variables, ...

5年以上 前 | 2

| 採用済み

回答済み
export an array to a text file
As documentation for csvwrite says, it is able to write numeric data arrays only; you're trrying to include header data inside t...

5年以上 前 | 0

回答済み
error in figure in matlab
It is, only you have so many points they're all on top of each other instead of being able to distinguish individual points. Yo...

5年以上 前 | 1

回答済み
Smart import of random files
"When the instrument creates its output, this is in .dat." AHA! So you created the problem with the spreadsheet yourself, not ...

5年以上 前 | 0

| 採用済み

回答済み
Smart import of random files
c=readcell('Input_type_1.xlsx'); % read as cellstr array c=c(~cellfun(@(c)all(ismissing(c)),c,'Unifo...

5年以上 前 | 0

回答済み
Smart import of random files
Save the file as a .csv instead of .xlsx. May have to coerce Excel to not double-quote the strings; I presume there's a way but...

5年以上 前 | 0

さらに読み込む