Answered
Help with converting decimal dates in a loop
>> t=xlsread('Example.xlsx'); >> [dn,ds]=convertTN(t); >> whos t dn ds Name Size Bytes Class...

8 years ago | 0

Answered
Help with converting decimal dates in a loop
A = xlsread('Example.xlsx'); [fid,msg] = fopen(sprintf('Example3.txt'),'wt'); assert(fid>=0,msg) dates=A(:,5); ...

8 years ago | 0

Answered
Cell Array of Strings Indexing and Relabeling to Numeric Values?
This is perfect use for |categorical variable...and to use a |table| instead of cell array for the data structure. Life will be...

8 years ago | 0

| accepted

Answered
Remove cell array rows based on logical condition?
With what you've got, you're just looking for raw(I,:)=[]; to leave week weekday rows of all the data. Knowing the ac...

8 years ago | 1

Answered
How do I read data from a filename called in code or make the filename a string?
[files,pathname]=uigetfile('*.csv','Select One or More Files','MultiSelect','on').'; % NB: return column vectors for i=1:s...

8 years ago | 0

Answered
Display only part of a plot?
Yeah, but you have to evaluate the function over the range you want and use the results to do the plotting instead of the overlo...

8 years ago | 1

| accepted

Answered
How to map a matrix with numerical and string data to a matrix in range [1,5] ?
out=interp1([min(in) max(in)],[6 1],in); It's just a linear transformation, you can also compute the coefficients of the po...

8 years ago | 1

Answered
How to determine the end of an array you are putting data into in an excel file?
Read the doc (carefully)... :) ... RANGE Character vector or scalar string that specifies a rectangular portion of ...

8 years ago | 0

| accepted

Answered
Calculate wet bulb temperature from ambient temp, dew point, and atmospheric pressure
Simplest would be to move all of the functions into a single m-file and turn the outer script into a function and thereby be abl...

8 years ago | 0

| accepted

Answered
How to change array parameters in a loop function?
analyzerData(:,((i-1)*4)+4) = transpose(str2num(query(analyzer, "DATA? 'VS'"))); analyzerData(:,((i-1)*4)+4) = transpose(st...

8 years ago | 1

| accepted

Answered
Make same axes for subplots?
Presuming |hF| is the handle of the figure and |hAx| is the array of axes handles you saved when you created the subplots, you c...

8 years ago | 0

| accepted

Answered
I have a cell array with 10 cells and various values in each cell. I would like to make a stacked histogram of this data, where each cell is color coded to distinguish it from the others. Is there a way to do this on matlab?
Is this what you had in mind, perhaps? load risetime n=cellfun(@numel,risetime); nMax=max(n); aug=cellfun(@(r,n) c...

8 years ago | 1

| accepted

Answered
Could upo please help me to solve my problem?
The latter is unsupported syntax; named parameter/value pairs can only trail all the given x,y,linespec triplets and that partic...

8 years ago | 0

| accepted

Answered
Write missing data as NaN
OK, without |timetable| and |retime|... dt=(datetime(data(1,1:6)):minutes(15):datetime(data(end,1:6))).'; % build the full...

8 years ago | 0

| accepted

Answered
Mean function of timeseries with NaN
MATLAB determines weighting by: Attaching a weighting to each time value, depending on its order, as follows: First ti...

8 years ago | 0

Answered
Write missing data as NaN
tt=timetable(datetime(data(:,1:6)),data(:,end)); tt.Properties.VariableNames={'Data'}; tt=retime(tt,tt.Time(1):minutes(1...

8 years ago | 0

Answered
Statistic Toolbox all combinations 6 Parameter
D=fullfact(4*ones(1,6)); |fullfact| returns the design levels as 1:L; to have as wanted levels since they're all same for e...

8 years ago | 0

Answered
I couldn't understand why my code works with R=1.2 and d=3.6 values but doesn't work with R=1.3 and d=3.9 values. Can you help me?
>> 1.2*3-3.6 ans = -4.4409e-16 >> 1.3*3-3.9 ans = 4.4409e-16 >> Neither are exact in the world of floating poin...

8 years ago | 0

| accepted

Answered
How to create a For Loop to Loop through all the rows in the matrix
You don't need any loops at all...use the MATrix LABoratory vectorized operations. You already have the the signal in the array...

8 years ago | 0

| accepted

Answered
why if condition is not working in this code.
As noted, perhaps the following would help... >> x=input('enter no1: '); z=input('enter no2: '); if (x<z) ...

8 years ago | 0

Answered
How to convert all data from text file into a single column?
EQ=xlsread('Data.xlsx'); EQ=reshape(EQ(:,1:8).',[],1); will return the first 8 columns as vector presuming order is by r...

8 years ago | 0

| accepted

Answered
Compare string array columns for equality then display all non-equal rows
>> y(x(:,2)~=y(:,2),:) ans = 2×2 string array "1" "x x x" "4" "x x x" >>

8 years ago | 0

| accepted

Answered
Drawing a Heatmap for a large dataset.
Probably <https://www.mathworks.com/help/matlab/ref/heatmap.html#bvm6n8w-1 Heatmap CustomAggregation> example will help.

8 years ago | 0

Answered
text in colorbar display
Not sure how you managed to get the above; you don't show code so we can't reproduce it w/o a lot of effort. Without doing extr...

8 years ago | 0

| accepted

Answered
how to start my plot from start of axis
But you plotted against ordinal number of observation... plot((SMed_eq),'-r','Marker','*','LineWidth',1.3); hold on p...

8 years ago | 0

Answered
How can I force matlab to write all decimal places to a .txt file?
_"cuts off digits past the hundredths place in the first column, but not for the second column. "_ fprintf(fileID,'%6.2...

8 years ago | 1

| accepted

Answered
XLSWRITE not behaving as expected
_"Am I missing something here or has the source code changed over the years?"_ What you're missing in |dlmwrite| is dlmw...

8 years ago | 1

| accepted

Answered
Return subscripts of common rows for multi-dimensional matrix?
ix=mod(find(all(ismember(A,B),2)),size(A,3));

8 years ago | 0

Answered
How do I reshape a large matrix?
B=reshape(A,[],9); The kicker is that mod(numel(A),9)==0 or will fail or will have to pad/truncate A.

8 years ago | 0

Answered
Can someone suggest good resource for signal analysis using FFT?
I'm a geezer so my standby favorite for years has been <https://www.amazon.com/Fast-Fourier-Transform-Its-Applications/dp/013...

8 years ago | 0

| accepted

Load more