Respondida
Extract columns from multiple csv files
targetColumn=3; % don't bury magic numbers, use input() to set, maybe... rootdir = 'C:\Work\TESTIN...

más de 7 años hace | 0

Respondida
To generate alternate 0's and 1's
One brute force way-- B=[]; for i=1:numel(A) B=[B (1-mod(i,2))*ones(1,A(i))]; end

más de 7 años hace | 1

Respondida
How to solve "Matrix dimensions must agree" getting from Matlab.
OK...still a little unclear but I think I've got enough of a picture to at least lay out the general idea. It'd be a lot easier...

más de 7 años hace | 0

Respondida
Data Linking And value reassignment for variables
I presume the "~-0" clause is to not eliminate i==j? Or can there be actual identical matches elsewhere? Either way the first...

más de 7 años hace | 0

| aceptada

Respondida
Troubleshooting Import big excel file
>> t=readtable('export.csv'); >> whos t Name Size Bytes Class Attributes t 45x255 ...

más de 7 años hace | 1

| aceptada

Respondida
How to solve "Matrix dimensions must agree" getting from Matlab.
if ('difficult = 0-back') & ('sleepstate = SD') is bad syntax on many fronts. First you've built a quoted string by usin...

más de 7 años hace | 0

Respondida
Help concatenating a table row to a specific excel spreadsheet?
outputTable=table(VarNameStr,Screen_Grasp_Average,Grasp_Release_Average,difference); writetable(outputTable,D:\LocationName\Dat...

más de 7 años hace | 0

| aceptada

Respondida
FFT - How is the signal distributed between different frequency bins?
The frequency bins are fixed by the sampling rate; the magnitude of each bin is determined by the computation of the fourier coe...

más de 7 años hace | 1

| aceptada

Respondida
Plot function into subplots
for i=1:3 hAx(i)=subplot(3,1,i); plot(x(:,i),y(:,i)); end presuming all x,y are same length. If they're not, then savin...

más de 7 años hace | 0

| aceptada

Respondida
Set Properties.VariableContinuity to a single column in a timetable?
Per the documentation, ". This property can be an empty array, which is the default. If the array is not empty, then the number ...

más de 7 años hace | 0

| aceptada

Respondida
Colormap utility - two axes in colorbar
Yeah, it's doable...refinements needed, but general idea works. Z = peaks(20); [~,hCF]=contourf(Z,10); hAx=gca; ...

más de 7 años hace | 1

| aceptada

Respondida
download excel from web, webread doesn't work
Ah! That's actually a link to an Excel spreadsheet file, not web service data. Use websave('UMichSurvey.xls',url) ...

más de 7 años hace | 0

| aceptada

Respondida
functions suddenly connected after restart
Apparently focus was in the editor and some of your keystrokes CTRL^C got interpreted to paste and some extra end statements wer...

más de 7 años hace | 0

| aceptada

Respondida
How to set mmmm dd, yyyy as per our choice in the datestr command?
datestr(datetime(2017,9,2,2,0,0))

más de 7 años hace | 0

Respondida
Avoiding automatic sorting of eigenvalues
EIG() does NOT return sorted values; it returns them to the user in the order in which the underlying LAPACK routine calculates ...

más de 7 años hace | 1

| aceptada

Respondida
How to display a vector in edit text in MATLAB?
By default it appears the Edit control converts an array to a column array of values and you can't display that in one row...if ...

más de 7 años hace | 0

Respondida
remove first element in cell and do not change index of other element
You're overthinking the problem...the first index is always 1... >> cellfun(@(a) 2:numel(a),A,'uni',0) ans = 1×3 cell array...

más de 7 años hace | 0

| aceptada

Respondida
a big cell array
Follow the documentation--for xlswrite, every cell element has to be a single value. So, if your array has cells (or any single...

más de 7 años hace | 0

Respondida
List combinations and count how many it appears
y=Y(W~=0,:); z=unique(sort(cell2mat(arrayfun(@(i) nchoosek(y(i,y(i,:)~=0),2),1:size(y,1),'uni',0).'),2),'rows'); nZ=arrayfun(@...

más de 7 años hace | 1

Respondida
How to replace all 1x1 cells containing 'NAN' with 'NaN'?
opt=detectImportOptions('Equinor.txt'); t=readtable('Equinor.txt',opt); >> t.TIMESTAMP=datetime(t.TIMESTAMP,'InputFormat','uuu...

más de 7 años hace | 0

| aceptada

Respondida
How to obtain the unique combinations of two columns in a table
year = [1994, 1994, 1994, 1995, 1995, 1995, 1996, 1996, 1996].'; type = {'AA', 'BB', 'CC', 'BB', 'BB', 'BB', 'AA', 'CC', 'CC'}....

más de 7 años hace | 0

| aceptada

Respondida
Relative frequency y-axis using the histfit function
IIUC, N1=sum(h1(1).YData); N2=sum(h2(1).YData); h1(1).YData=h1(1).YData/N1; h1(2).YData=h1(2).YData/N1; h2(1).YData=h2(1).Y...

más de 7 años hace | 0

| aceptada

Respondida
Total Hour Conversion to Date and Time
t=readtable('hc07.xlsx'); leaves me with >> t(1:5,:) ans = 5×21 table RECORDED CH04_HC07_CZ_SD_Cor...

más de 7 años hace | 1

Respondida
How to replace all 1x1 cells containing 'NAN' with 'NaN'?
>> load bin1 >> whos bin1 Name Size Bytes Class Attributes bin1 8396x1 112268...

más de 7 años hace | 1

Respondida
thresholding for multiple values
t1=meadian(Gbird(:)); median is misspelled... What do you want/expect as a result? Logicals don't work that way; you'll have ...

más de 7 años hace | 0

Respondida
How to convert a string to number in gui
Aha! OK, now I see the problem...indeed, '10' is a 1x2 char array and so it is a vector and the short-circuit logical operators...

más de 7 años hace | 0

| aceptada

Respondida
FOR Loop _ Sum columns in Excel
As one alternative solution to S S, there's the readtable route... t=readtable('BPAQ.xlsx'); ...

más de 7 años hace | 1

Respondida
datetick gives me errors
You don't show definition of X, but datetick works only for axes drawn with datenum which is a double. But, datenum is old and...

más de 7 años hace | 0

Respondida
error bars plotting only on one side of the data points on a semi log plot
Check and you'll find the lower limit for those not plotted is <0 which can't be represented on log axis.

más de 7 años hace | 1

| aceptada

Respondida
Can I plot a cfit object and specify the LineSpec using name/value pairs?
No, TMW didn't implement the named parameter interface in the cfit class plot() method. Another example of not following the ge...

más de 7 años hace | 0

| aceptada

Cargar más