Respondida
Locating characters in a string array
As the other respondent says, you don't need a corollary array unless the lookup isn't 1:1 with position (which your description...

más de 6 años hace | 1

Respondida
Extrapolate using half the slope than in original data
You've got to match the two at the breakpoint...w/o data so didn't use but the endpoints to roughly match your figure... x=[1 2...

más de 6 años hace | 1

| aceptada

Respondida
How to change strange cell array within a table to double or categorical array
Use the optional valueset, and perhaps catnames inputs to categorical to define as desired.

más de 6 años hace | 0

Respondida
What exactly does tStat of fitlm function refer to?
Well, it's the basic linear model hypothesis test statistic that each coefficient in the model is significantly different from t...

más de 6 años hace | 0

| aceptada

Respondida
How can I change the pspectrum time units?
t = seconds(0:length(x)-1)/fs; will fix it.

más de 6 años hace | 0

| aceptada

Respondida
Heatmap Axis Labels Printing Vertically?
Oh, TMW has done it again -- they've buried stuff inside opaque (to the user) objects that should be visible. I wish they would...

más de 6 años hace | 0

Respondida
Issue with finding intersection between randomly generated matrices
The results for intersect are correct .. >> (A(16,:)-A_new(3,:)) ans = 1.0e-13 * 0 0 0.1421 >> The ...

más de 6 años hace | 0

| aceptada

Respondida
How to check each number in a user given vector
if nargin<3 GNSSflag = [0 0 0 0]; GNSS = {'GPS','GALILEO','GLONASS','BEIDOU'}; [indx,tf] = listdlg('ListString',G...

más de 6 años hace | 0

Respondida
Remove the legends for some lines in a plot
If you only want the scatter points in legend, set the 'Annotation' property to not show the lines... plot(fittedX, fittedY...

más de 6 años hace | 0

Respondida
Matlab command for plotting complex number?
See https://www.mathworks.com/help/matlab/creating_plots/plot-imaginary-and-complex-data.html

más de 6 años hace | 0

| aceptada

Respondida
Merge datetime with another cell for export
Sure... >> c={datetime(now,'ConvertFrom','datenum'),pi} c = 1×2 cell array {[25-Jun-2020 08:22:52]} {[3.14]} >> wr...

más de 6 años hace | 0

| aceptada

Respondida
How to combine 2 Fits done with cftool
%% Fit: 'untitled fit 1'. [xData1, tmp] = prepareCurveData( Fqr, Prem ); yData1 = tmp+pi/2; % Set up fittype and options. ...

más de 6 años hace | 0

| aceptada

Respondida
How to compare the colums ( 2nd and 3rd) of 2 .csv files based on a condition
Has to be a more direct way, but following works if I understand the request -- tF1=readtable('file1.csv'); tF1.condition=categ...

más de 6 años hace | 0

Respondida
How to add the year to the stairs plot
Use a datetime for your time variable and you'll get time plots automagically along the x axis and can set xlim() values with da...

más de 6 años hace | 0

Respondida
I want to plot Linear Equations but dont know how to do it on matlab
Since you're still new, let me make some suggestions on coding -- First, use newer features -- if you'll read the doc for xlsre...

más de 6 años hace | 0

Respondida
Speed up FFT calculation
"The signal matrix is 36350x2048, 36350 being the number of signals and 2048 being the zero padded length of each signal. " Use...

más de 6 años hace | 0

| aceptada

Respondida
Error when trying to plot multiple box plot's in the same graph.
Your orientation for kcnt1Table is wrong -- as is you'll have 13 boxes, not six; boxplot treats each column as variable. You do...

más de 6 años hace | 0

| aceptada

Respondida
Calculate average for each hour in day
IIUC, retime is not the tool for this; it bins data into desired time segments such as hourly but averages within those bins. T...

más de 6 años hace | 1

| aceptada

Respondida
How to simplify the for loops and if statement in this code
Straightahead w/o trying to save some recomputations that could be done by complements-- k=[sum(A==B & A==0,'all') sum(A==B & A...

más de 6 años hace | 0

| aceptada

Respondida
Creating a mesh plot with data in a timetable
OK, the above conversation branched another route -- time=datenum(Time); % convert to datenum since they're doubles...

más de 6 años hace | 0

| aceptada

Respondida
Using bar3 and color coordinating the height depending on the value
They're all the faces color vertices data -- it's a convolved mess to fiddle with manually, fer shure, good buddy! :( Your cod...

más de 6 años hace | 1

Respondida
Creating a mesh plot with data in a timetable
That form for meshz doesn't use any x-,y-coordinates at all -- it just plots against the ordinal position numbers of the Z array...

más de 6 años hace | 0

Respondida
extract year from date and add to a table
Nothing, really. It's an undocumented edge case of incorrect input to the function datenum that for some reason instead of thro...

más de 6 años hace | 0

| aceptada

Respondida
How i accumulate multiple variables?
out=out(:); % just reshape to column vector Use k=2*(i-1)+j; % for index vector where i,j ==> a(:,1), a(:,2), resp...

más de 6 años hace | 0

| aceptada

Respondida
percentage of up days every 12 days
However, the neatest solution is probably nD=12; % number days for moving percentage dCP...

más de 6 años hace | 0

Respondida
Converting C++ to MATLAB: statement
A[index1d(x,y,z)] = A[index1d(x,y,z)] + B[i]*W; in C/C++ Presuming conformance of dimensions, etc., A(index1d(x,y,z)) = A(i...

más de 6 años hace | 1

| aceptada

Respondida
percentage of up days every 12 days
"counting the numbers of up market taking the the first closep(2:13) then (3:14) then (4:15) and so on..." OK, so a running num...

más de 6 años hace | 0

Respondida
Acquiring corresponding Columns of Data when a condition is met
Recommend readtable for disparate data -- much easier to handle variables of different types... tSample=readtable('Sample.xlsx'...

más de 6 años hace | 0

| aceptada

Respondida
How can I assign a variable to a string?
>> whos -file simplu Name Size Bytes Class Attributes T - 1440 table ...

más de 6 años hace | 0

| aceptada

Respondida
How to write function for above combine matrix?
" want above pattern, matrix size is [21,3]." ADDENDUM/ERRATUM: [But we have now learned that that is NOT even the correct des...

más de 6 años hace | 0

Cargar más