Respondida
Weird .csv file plot problem
The first syntax per the documentation plots all columns of _K_ versus ordinal number You're on the right track with the seco...

más de 8 años hace | 1

| aceptada

Respondida
Find NaN values in cell array that stores changing types of elements over time
I'd still fix it there...the very last thing in the function function [costs,paths] = dijkstra(AorV,xyCorE,SID,FID,showWait...

más de 8 años hace | 0

| aceptada

Respondida
Replace specific values in one column with value from the same row of another column
Pretty simple, yes...first rebuild the table as described... s=["NaN" "" "" "NaN" "D" "NaN" "NaN" "E"].'; c=categorical(...

más de 8 años hace | 1

| aceptada

Respondida
Open multiple text files remove all rows with number less than -65.0 in the first column
A reasonable start with a few "issues"... First, by just using |dir| you'll get the null directory entries as well as files, ...

más de 8 años hace | 0

Respondida
How to call a value from a file within an equation?
Define anonymous function-- fnAggRF=@(n)(-1.3e-6.*(('CH4(n)'-'CH4(0'))/2)-8.2e-6*n+.043)*(sqrt(CH4(n)-sqrt(CH4(0)))); Th...

más de 8 años hace | 0

| aceptada

Respondida
how to read sequence of files that are seemingly random
d=dir(fullfile('YourBaseDirectory','myPos_*.mat'); for i=1:length(d) load d((i).name ... % Do what ever need...

más de 8 años hace | 2

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

más de 8 años hace | 0

Respondida
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); ...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 1

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 1

| aceptada

Respondida
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...

más de 8 años hace | 1

Respondida
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 ...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 1

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 1

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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) ...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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" >>

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

| aceptada

Cargar más