Respondida
How to find mean and errorbars for scatter plot at various x values.
The specific answer is M1=mean(Mat2,'all'); S1=std(Mat2,[],'all'); general answer is to not create multiple sequentially-name...

alrededor de 4 años hace | 1

Respondida
deleting the last row of csv file
If have R2020b or later, the simplest portable coding solution would be data=readlines('yourfile.csv'); data(end)=""; writema...

alrededor de 4 años hace | 1

| aceptada

Respondida
Trying to average values from specific cells in a similarity matrix
Not too bad ... use logical addressing to find the locations and the mean with the 'omitnan' argument over the values returned.....

alrededor de 4 años hace | 0

Respondida
Find that particular start index at which the atleast 6 points are consecutively increasing
OK, since we have real data, I'll just use it and illustrate the way the previous code works with it... a=readmatrix('https://w...

alrededor de 4 años hace | 1

| aceptada

Respondida
matlab plot rendering problem
load https://www.mathworks.com/matlabcentral/answers/uploaded_files/1115780/y2_max.mat I dunno whassup w/ this last couple days...

alrededor de 4 años hace | 0

| aceptada

Respondida
Elegant way to batch extract all as single data from Data Pool
The real answer in MATLAB is "Don't Do That!" -- making variables out of array elements generally is not the way to write effic...

alrededor de 4 años hace | 2

Respondida
There are 500 different sizes of a bolt ranging around 0.5 mm. I want to separate the sizes that are above or below the tolerance. then add those results in a column vector
No loops needed in MATLAB for this kind of logical addressing problem -- ... N=numel(boltMeasurements); %...

alrededor de 4 años hace | 1

Respondida
Am importing five columns of numeric data from an excel file. Why is MATLAB not detecting the third and fourth columns as numeric data ? how can i change them to numeric data
Because the first entries are NOT numeric -- they're asterisks which can't be interpreted as numbers. Use detectImportOptions a...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to fix overlapping tick labels?
Not so bad, just have to remember the trick, Walter... :) Once you've got the ticks labeled as you have where you want them, th...

alrededor de 4 años hace | 0

Respondida
Extract all data for the June months over the years from a timetable
Piece 'o cake -- granted, it takes a little while to get used to using grouping variables and all, but... load https://www.math...

alrededor de 4 años hace | 1

| aceptada

Respondida
Unable to write data in already open .xlsx file
<microsoft.com Excel/use-shared-workbook> explains how to save a workbook as shared for simultaneous access. I've not tried thi...

alrededor de 4 años hace | 0

Respondida
How to close a dos window after a .exe is finished running?
Actually, the line [x, y]= dos(C:\\Users\jessi\Desktop\HydrusMC\H1D_CALC.exe); can't work -- the argument to dos must be a c...

alrededor de 4 años hace | 0

Respondida
Find that particular start index at which the atleast 6 points are consecutively increasing
For small sample size such as this, the string conversion route is probably as good as any... ERRATUM: Forgot that "-111" woul...

alrededor de 4 años hace | 0

Respondida
How to open file, clear content, rewrite conent and close.
DIR_working="C:\Users\jessi\Desktop\HydrusMC\Simulations\MC_"+[1:num_sim].'; writematrix(DIR_working,'C:\Users\jessi\Desktop\Hy...

alrededor de 4 años hace | 1

Respondida
Find values in a column that fall between two numbers
MATLAB requires compound logical tests be written separately...and you don't need find, just the logical result vector.. vLo=4;...

alrededor de 4 años hace | 1

| aceptada

Respondida
I get wrong logic while I compare two datetimes
@Karim has explained why the logic test is correct because your inputs to isbetween are in the wrong order for the result to be ...

alrededor de 4 años hace | 1

| aceptada

Respondida
How to calculate the small changes in a signal?
We've elsewhere determined the data are recorded as signed 16-bit integers which span +/-32K which is a 64K range. A default do...

alrededor de 4 años hace | 1

Respondida
How can I read a column from excel while I do not want all the data of that column?
It's VERY inefficient to open/read/close the same file three times, not to mention it just makes for more work to address multip...

alrededor de 4 años hace | 0

Respondida
Issues with readtable in 2022a but same line of code worked with 2018a
I've not yet updated past R2020b so can't check later releases -- but, it works seemingly just fine with R2020b (same warning re...

alrededor de 4 años hace | 0

| aceptada

Respondida
Import options & loops for time series data
W/o the second Q?, my approach would be something like -- First, read, create the metadata table of auxiliary data... metadata...

alrededor de 4 años hace | 0

| aceptada

Respondida
In "scatter"-related legends, how to make larger symbols ?
My experimenting with legend and scatter wasn't very fruitful; the legend was created with a given size (height, primarily the i...

alrededor de 4 años hace | 1

Respondida
Reading int16 from a file and writing as int8 to another file
Don't open/close the files inside the loop -- just read/write them sequentially... ... fidi=fopen('/home/read.bin','r'); % ope...

alrededor de 4 años hace | 0

| aceptada

Respondida
I have issues using datenum function because of a different date format on excel, how can I modify my dates in matlab and then run the function?n
Don't use datenum, use datetime instead and readtable, You can either use an import options object from detectImportOptions in...

alrededor de 4 años hace | 1

Respondida
I don't want to include initial condition in the plot
Again, way too much code that has no bearing on the issue -- and you don't format your code so can be read on top of that -- we'...

alrededor de 4 años hace | 0

| aceptada

Respondida
Separating and splitting table by numeric values and writing to multiple files
" split the grouped devices into seperate tables?" The short answer is "you don't!" Use the DeviceID variable as a <GroupingVa...

alrededor de 4 años hace | 1

| aceptada

Respondida
calling a built-in private function
private functions are unable to be called from anywhere excepting either the folder containing the function itself (not the inte...

alrededor de 4 años hace | 2

| aceptada

Respondida
Want to convert whole data in a binary/ text file in to binary digits
To use native I/o conversion, hex values must be preceded by '0x' so will either need to do that string substitution or read as ...

alrededor de 4 años hace | 0

Respondida
Finding the mean of each column of each double within a structure
Something like M=arrayfun(@(s)mean(s.Data(:,2:end)),beh_data,'UniformOutput',0).'; % calculate the means M=cellfun(@(c)struct(...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to find '1' for the second time in a matrix by row wise
Probably more efficient way to deal with the cell array indexing, but C=arrayfun(@(i)find(A(i,:),2),1:size(A,1),'UniformOutput'...

alrededor de 4 años hace | 0

Respondida
Only one graph appear instead of two.
You forgot hold on to put more on the same axes after the first... plot(T,Psat1,'r'); hold on plot(T,Psat2,'b'); title('Sa...

alrededor de 4 años hace | 0

Cargar más