Respondida
how to place a legend in best corner?
Try legend(___,'Location','best') ML tries to avoid the most data it can if it can find a location that the legend doesn't occ...

más de 7 años hace | 2

Respondida
Can I add a table that immediately has data taken from it and added to a graph?
NMax=826; % the max length or have to figure dynamically d=dir(fullfile('yourworki...

más de 7 años hace | 1

| aceptada

Respondida
Importing or reading a column with both text and numerical data using textscan
Not too much grief... :) t=readtable('MIKE.txt'); % read raw data t.p01m=cellfun(@str2double...

más de 7 años hace | 1

| aceptada

Respondida
Replace string values with another string value.
fntwoscomp=@(v,n) dec2bin(mod(v,2.^n),n); >> fntwoscomp(-3:3,5) ans = 7×5 char array '11101' '11110' '11111'...

más de 7 años hace | 1

| aceptada

Respondida
how to find input value of a function knowing one of the outputs?
Q_Htgt=5; % the target solution value fnQ=@(QG) getGUE(T_hwi,T_set,T_ext,QG)-Q_Htgt...

más de 7 años hace | 1

| aceptada

Respondida
how to plot time stamps
Revamp your input parsing a little... fmt=['%s %d %d %d %f %*s']; % string type, ID, HR, MN, S.SSS, blank record fi...

casi 8 años hace | 0

| aceptada

Respondida
plot each line in a matrix
plot (t,sw.') Just transpose the array to use plot()'s builtin facility to plot each column as a variable. It's the power of t...

casi 8 años hace | 4

Respondida
How can i concatenate two or more flaoting numbers to a single number without rounding them ?
s=sprintf('%g',n); s=strrep(s,'0.',''); s(s=='.')=[]; >> disp(s) 123451256401250014 >>

casi 8 años hace | 0

| aceptada

Respondida
any way to plot scatter-line with different symbol
Not by controlling the 'marker' properties in a single scatter call, no, unfortunately. Those are global for the object. It's ...

casi 8 años hace | 0

Respondida
Median Value of specific data by index
xc=categorical(x(:,1)); % convert indices to categorical (not mandatory, sometimes convenient) [G,grp]=findgroups(...

casi 8 años hace | 0

| aceptada

Respondida
Plotting timetable data: how to add x-axis ticks, labels and gridlines on 1st and 15th day of each month
t=[datetime(2018,6,1):datetime(2019,3,1)].'; % build a sample dataset... tt=timetable(t,randn(size(t))+10); % j...

casi 8 años hace | 2

| aceptada

Respondida
How can I remove double and single quotations from multiple large .csv files located in the same directory efficiently?
To answer the last Q? first, "No, csvread can't read such a file." But, there's no reason at all to change the file format, jus...

casi 8 años hace | 0

Respondida
repeat rows in a matrix based on values in one column
u=unique(x(:,1),'stable'); % get the unique values in first column to work over; keep original order xx=[]; for i=numel(...

casi 8 años hace | 0

| aceptada

Respondida
Plotting Air Density as a function of altitude (in SI Units)
Just because you don't get an actual error doesn't mean calculations are correct -- you've got a discontinuity in the correlatio...

casi 8 años hace | 2

| aceptada

Respondida
Can I make a functions input a counter variable for a for loop
"So I have to make an input (SlotRounds) be used in a for loop..." Who says you "have to" do anything, specifically, about how ...

casi 8 años hace | 0

Respondida
How do I name a graph using a string with probplot?
titlestr=strcat('Number of VCSELs = ',num2str(size(data,2)),' Number of failures = ',num2str(NFail)) title('titlestr') ...

casi 8 años hace | 0

| aceptada

Respondida
for loop produces a 103x1 array I need a 1x103 array.
Write P_S(ii,1)... But, why use a loop at all--use the vector functions in Matlab instead. I've not tried to decipher the RHS...

casi 8 años hace | 0

| aceptada

Respondida
How do I Create a Matrix that connected to Excel using MATLAB
Have to know the structure of the file or write code to find what you want...I'll presume you can count columns... :) >> [n,t,r...

casi 8 años hace | 0

Respondida
FFT from CSV file
Follow the recipe provided precisely...you've doubled the DC and Fmax components so that the DC bias is shown as twice what it w...

casi 8 años hace | 0

| aceptada

Respondida
Creating plot with 2 x axes
If you'll go through step by step, you'll see the problem doesn't occur until the second plot() call -- you didn't hold the seco...

casi 8 años hace | 3

| aceptada

Respondida
I have a matrix (57,3600,45), how can I create matrices with (3600,45)?
Why did you store data in such a permuted order? However, not to fear, MATLAB can fix your problem! data=permute(data,[2 3...

casi 8 años hace | 0

Respondida
Comparing common strings in two large string arrays imported from excel (using xlsread)
[c,ia,ib]=intersect(categorical(s1),categorical(s2));

casi 8 años hace | 0

| aceptada

Respondida
Plot data with x-axis as date
t=datetime(2019,1,1,0,0:15:365*24*60-15,0); plot(t,randn(size(t))) hAx=gca; hAx.XTick=datetime(2019,[1 7 12],1); ADDENDUM: ...

casi 8 años hace | 0

| aceptada

Respondida
if function for array
I have a little utility function ("syntax sugar") for such things... plot(x(iswithin(x,52,54))) where >> type iswithin.m ...

casi 8 años hace | 0

| aceptada

Respondida
I want to read similar column headers and standardize their names
Picking up where left off above with two string arrays of quoted string column labels from the two shown-to-be-different files.....

casi 8 años hace | 1

| aceptada

Respondida
Saving a cell with multiple vectors of different length to csv or xlsx
The easier way but does open/close the file every time... N=size(val,3); rOff=0; for i=1:N v=val{:,:,i}; ...

casi 8 años hace | 0

| aceptada

Respondida
Jump datetime in graphs and tables
You mean generate a series of some time difference (like three months above)??? dat=datetime(2010,2:3:9*12,1).'; dat.Format='...

casi 8 años hace | 1

| aceptada

Respondida
csvwrite is storing wrong number
>> tstary=int32(randi(2^31,104937,1810)); >> whos tstary Name Size Bytes Class Attributes ...

casi 8 años hace | 1

| aceptada

Pregunta


COM Syntax Queston (Excel example but general puzzle)
If/when driving Excel or other apps via COM/ActiveX, "dot" syntax isn't always available for every method and one is forced tor ...

casi 8 años hace | 1 respuesta | 0

1

respuesta

Respondida
How to normalize curves with multiple peaks such that each peak will be 1 and each valley will be 0?
If you mean 'builtin' already coded to do that, "No, I don't think so!" I've never seen it actually done before; don't think it...

casi 8 años hace | 0

| aceptada

Cargar más