Respondida
How to extract data from a table based on a specific variable
# Convert the categorical variables from character representation to |categorical| # Use |findgroups| and |splitapply|, |grpsta...

alrededor de 8 años hace | 0

| aceptada

Respondida
Create index vector from grouping variable
|gr2idx| is used with the Statistics Toolbox implementation of a categorical variable type. Unfortunately, while it was useful ...

alrededor de 8 años hace | 0

| aceptada

Respondida
Operands to the || and && operators must be convertible to logical scalar values
OK, this took a little while to debug... :) The problem is in function |trapecios|, if the input argument is <1 then L=1...

alrededor de 8 años hace | 1

Respondida
Error in plotting graph
From <https://www.mathworks.com/help/matlab/ref/graph.html> graph(s,t) ... s,t — Node pairs ... Node pairs, ... graph...

alrededor de 8 años hace | 1

Respondida
grpstats for non-numerical data
Convert those variables to |categorical| which is what they are, really, not string. Then, internally to Matlab, they _are_ num...

alrededor de 8 años hace | 0

Respondida
Splitting Cells Contents into A Uniform Dimension
opts = matlab.io.text.FixedWidthImportOptions; % create a basic import object to fill in opts.DataLine=2; opts.Variable...

alrededor de 8 años hace | 0

Respondida
How can I get Curve fitting coefficients in a matrix from fit function fittype?
% move model definition outside loop; it's invariant ftype=fittype('Bmax*(P0+x+Kd-sqrt((P0+x+Kd).^2-4*P0*x))./(2*P0)',... ...

alrededor de 8 años hace | 0

| aceptada

Respondida
What is the code for defining a binary array in Matlab?
IDL Data Types Data Type Description Type N...

alrededor de 8 años hace | 0

Respondida
Where am I going wrong in my for loop? I am getting NaNs
... T_num = nan(length(z),length(t)); % initialized to NaN T_num(:,1) = T_av; %initial temperatur...

alrededor de 8 años hace | 0

Respondida
Averaging second data to minute data
Convert to |timetable| and use |retime| tt_secs=array2timetable(data(:,2),'rowtimes',datetime(data(:,1))); % convert to ti...

alrededor de 8 años hace | 0

Respondida
How to import .dat data
fid=fopen('yourfile.dat','r'); data=cell2mat(textscan(fid,'','CollectOutput',1,'CommentStyle','#')); fid=fclose(fid); ...

alrededor de 8 años hace | 1

| aceptada

Respondida
I have a given set of data and will like to do a distribution fitting (for gamma and lognormal) and return a P-P plot. What matlab function is best suited for this?
See doc probplot % <https://www.mathworks.com/help/stats/probplot.html> There are many builtin distribution functions un...

alrededor de 8 años hace | 0

Respondida
How to assign values to a sparse matrix without iterations?
S=sparse(Nonloc(:,1),Nonloc(:,2),1);

alrededor de 8 años hace | 0

Respondida
Counting occurrences of each column in a matrix
Several ways to do this; probably easiest is via converting to |categorical| with the |unique| values in each column transformed...

alrededor de 8 años hace | 0

Respondida
How can I compute multivariate regression residuals?
You really have 1939 _different_ regressions or 1939 _observations_? Whichever, you get only one (the last) result the way th...

alrededor de 8 años hace | 0

Respondida
Extracting numbers from mixed string
v=str2double(strip(splitstr(s,'_'),'m')); % chuckles... In reality, write a |regexp| expression is the more general so...

alrededor de 8 años hace | 0

Respondida
what is the code for the default blue color for 2D plot?
>> get(groot,'defaultAxesColorOrder') ans = 0 0.4470 0.7410 0.8500 0.3250 0.0980 0.92...

alrededor de 8 años hace | 1

| aceptada

Respondida
how to populate a cell with a loop
fmt=[repmat('%f',1,14) repmat('%s',1,2) repmat('%f',1,29) repmat('%s',1,2) repmat('%f',1,8)]; % legible (sorta') format stri...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to read a txt and store specific line in matrix
fmt1='mode%n'; fmt2=['(' repmat('%f',1,3) ')']; flds={'X','Y','Z'}; fid=fopen(fname,'r'); dat=struct([]); i=0; ...

alrededor de 8 años hace | 0

| aceptada

Respondida
problems with function "find". matlab doesn't match two numbere which are built equal
dt = 1/fs; data= [data0; data1; data2]; time= 0:dt:(length(data)-1)*dt; is the root of the problem; can be demonstrat...

alrededor de 8 años hace | 0

| aceptada

Respondida
single trendline for multiple series
Sure, just group all the independent and dependent data arrays into one long vector for each. Presuming you have X,Y arrays s...

alrededor de 8 años hace | 0

Respondida
extract date and time preceded by strings with variable length from text file
fmt='%f%s%{yyyy-MM-dd HH:mm:ss}D%f%f'; dat=textscan(fid,fmt,'delimiter','\t','whitespace',''); This is directly related ...

alrededor de 8 años hace | 0

| aceptada

Respondida
What is missing from MATLAB?
Neither |textscan| nor |readtable| can handle _'X'_ format string; whassup w/ that? Why are hex data presumed to not be in te...

alrededor de 8 años hace | 0

Respondida
Date and Time Extraction for individual data points from patient monitor device
See <https://www.medicollector.com/medicollector-blog/how-to-access-data-in-medicollector-files-without-exporting medicollector-...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to extract the x,y and z coordinate points from NC code?
fmt='N%fX%fY%f'; fid=fopen('yourtextfile.ext','r'); NXY=cell2mat(textscan(fid,fmt,'collectoutput',1)); fid=fclose(fid...

alrededor de 8 años hace | 0

Respondida
How could you write a function that returns a histogram with axis labels and title
|hist| when save the return value only returns the counts vector and, as you've discovered; doesn't actually draw the plot. T...

alrededor de 8 años hace | 0

Respondida
How to normalize a matrix such that each column sums equal 1
You're missing the "dot" operator so the division is matrix divide not element-wise. See doc ./ doc rdivide % that's a ...

alrededor de 8 años hace | 1

| aceptada

Respondida
Passing functions in MATLAB
Look at function handles; there's a section under _Data Types_ in the documentation...

alrededor de 8 años hace | 0

Respondida
How to read a comma delimited .dat file containing mixed formats
Just read the file as it's given then parse the data columns... t=readtable('couzi.csv','ReadVariableNames',0,'Delimiter','...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to export coefficients names when using rstool?
Real issue with the Matlab user interface for most of the Curve Fitting and Statistics Toolbox stuff -- frequently it is very di...

alrededor de 8 años hace | 0

| aceptada

Cargar más