回答済み
Create table from excel spreadsheet with multiple sheets
See doc readtable

約8年 前 | 0

回答済み
Performing count in column given a condition specified in a different column?
Use more straightforward builtin functions for tables/categorical variables... >> Y=[repmat({'MAY'},8,1);repmat({'DG'},5,1)...

約8年 前 | 0

| 採用済み

回答済み
How can I use xlsread with changing indices?
x(j,:)=xlsread('filename',sprintf('A%d:A%d',i,i)); but I'd recommend against using it that way; |xlsread| opens and close...

約8年 前 | 0

| 採用済み

回答済み
Replace NaN in table with a corresponding value in a different column
You need the logical addressing vector on both sides and address to return table to update the table... idx=isnan(A.A5); ...

約8年 前 | 0

回答済み
Matlab for loops output
In |Sig(:,i) = Steer_Vec;| you have the indices reversed relative to the way you sized the array --- *ERRATUM:* Bad eyes... ...

約8年 前 | 0

| 採用済み

回答済み
Randomly return of a vector element. How to?
ixFix = N; % set the particular element however is to be done... iRet=[ixFix randperm(numel(A),1)]...

約8年 前 | 0

回答済み
Make an empty array stay the same size
As Walter says, you allocated an |int16| array but then trashed it by writing a |cellstr| to it; that change in type essentially...

約8年 前 | 0

回答済み
why the amplitude of fft is not the same as input signal?
See the extensive discussion previously at <https://www.mathworks.com/matlabcentral/answers/405924-hi-please-why-i-don-t-get-the...

約8年 前 | 1

回答済み
How to take the average of the columns of a matrix and insert into another matrix
fid=fopen('file.txt'); mn=[]; while ~feof(fid) n=fscanf(fid,'%d',1) if isempty(n),break,end d=cell2mat(te...

約8年 前 | 0

| 採用済み

回答済み
Need help regarding axis labeling using datetick
>> dt=datetime(1991,1+[0:321].',1); % build a datetime vector to match the dataset >> whos dt ...

約8年 前 | 0

| 採用済み

回答済み
Mat lab is only plotting one point for a linspace plot
You're missing the 'dot' in the "./" operator so ML is doing matrix division instead of element-wise...try L=1 - (t*(r.^k)...

約8年 前 | 0

回答済み
MATLAB Fouriertransform with nunequidistant values
The simplest route is to interpolate to a fixed sample rate and apply the FFT to that series. Alternatively there's a submiss...

約8年 前 | 0

回答済み
I need to map a binary array to 2 differnet values corresponding to 0 & 1
One of a zillion ways... C=complex(2*ones(size(A)),3*ones(size(A))); C(C==0) = 8-4i; Another less "deadahead" but one...

約8年 前 | 0

| 採用済み

回答済み
How to fit multivariate pdf and cdf from data
They're in the _BinCounts_ property of the object or you can just use the old |histcounts2|. *ADDENDUM* Ah, ok. I've not ...

約8年 前 | 1

回答済み
vgg16 and vgg19 give this error: "Attempt to execute SCRIPT vgg16 as a function:"
You tried to assign a return value to a variable on the LHS of an expression -- scripts don't have return values; they operate i...

約8年 前 | 1

回答済み
Ignoring markers and lines in legend
... legendInfo{k} = ['Factor = ' num2str(k)]; legend(Plot2,legendInfo) legend(legendInfo) ... If you want only ...

約8年 前 | 2

| 採用済み

回答済み
Boxplot help to get 4 plots into 1 graph of 5.
If you plot multiple |boxplot| into the same axis, they'll overlay each other for 1:N variables where N is the composite of numb...

約8年 前 | 0

回答済み
Use Logical indexing to replace the values in the matrix by its value divided by 2?
ixG7 = A>7; A(ixG7)=A(ixG7)/2; % presuming those are the numbers meant, of course.

約8年 前 | 0

| 採用済み

回答済み
How can i shift a curve not just only in plot?
Just add as many zeros to the end of the array as you delete from the front or use y=circshift(h,-N); Probably the more ...

約8年 前 | 0

| 採用済み

回答済み
Reading only certain columns from .csv file in matlab
It's far simpler to read the whole file into memory and then just cull the ones not wanted or keep those that are...and probably...

約8年 前 | 0

回答済み
Looking for an efficient method to repeat the script command for multiple files
folder='C:\Documents\MATLAB\Neuralynx\9Hz\'; % target subdirectory file='CSC*.ncs'); ...

約8年 前 | 0

回答済み
How to put error bars on top of grouped bars
See my previous at <https://www.mathworks.com/matlabcentral/answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center#a...

約8年 前 | 2

回答済み
change calculation into financial/fiscal year
Actually, it's pretty simple to accomplish. Given the year and month vectors, create a "financial year" by yrFin=yr; ...

約8年 前 | 0

| 採用済み

回答済み
plot a curved line of best fit through my data
<</matlabcentral/answers/uploaded_files/122744/untitled.jpg>> Post the data points, but the red line is clearly _NOT_ the lea...

約8年 前 | 0

回答済み
How to call a user-defined function
Store it in the working directory or in a directory on MATLABPATH. Depending on what the function purpose is, specialized or mo...

約8年 前 | 0

| 採用済み

回答済み
how can i add rows of multidimentional cell array ?
On the presumption interpreted the desire as _only_ the first row sum-- >> A=cell(3,5); % cr...

約8年 前 | 0

回答済み
can any one suggest me how we can fit a distribution which is a sum of various standard distributions to given data or to a normalized histogram
See doc cftool for the interactive fitting tool; it includes builtin Gaussian with up to eight (8) terms; it doesn't hav...

約8年 前 | 0

回答済み
How can I plot multiple graphs from a name column (from Excel)
Use |readtable| and then |splitapply| with the first column ID as grouping variable. I suggest turning it into categorical vari...

約8年 前 | 0

回答済み
webread exiting because of bad internet connection - how to continue the program automatically
See the section on Exception Handling in the documentation...specifically, doc try doc catch

約8年 前 | 0

| 採用済み

さらに読み込む