Réponse apportée
is it possible to copy a file on itself?
That isn't copying a file onto itself; there's nothing to prevent you doing what you want. Your copyfile command isn't referenc...

plus de 7 ans il y a | 0

Réponse apportée
Ploting every n-th result in a for loop
v=2;L=100; N=10; for t=0:0.01*N/v:L/v clf ... To introduce a 10-fold reduction...

plus de 7 ans il y a | 0

Réponse apportée
How can I plot hourly data in the same figure?
Use the features of Matlab to your advantage...granted, it takes some "time in grade!" to learn one's way around! :) As a gene...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Create a table with Revenue by financial year such as 2017-18
t=readtable('chindamo.xlsx'); % read the input table data t.Code=categorical(t.Code); ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
I can't delete plot and line in a figure
... p1 = line([xr xr],[0 f(xr)]); line([xr xr],[0 f(xr)]) ... x = [-10 0.01 10]; y = (x-xr).*df(xr)...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
marker size difference between 'plot' and 'scatter' function
Per the documentation, scatter marker size property is marker proportional to area while the line marker property is proportiona...

plus de 7 ans il y a | 5

| A accepté

Réponse apportée
How to convert each row of the matrix into a Character array, without using a for command?
Preallocate B may help just tad... Alternatives to loop include B=cellstr(num2str(A)); but what is end purpose for doing the ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Black and Grey Bars in Barplot
Need to apply the colormap to something... hAx=subplot(2,2,1); clrs = [0 0 0; 0.9 0.9 0.9]; colormap(hAx,clrs); hB=bar([perc...

plus de 7 ans il y a | 0

| A accepté

Question


Categorical variable in cell array?
This seems absurdly trivial but I haven't found the right syntax...I was trying to add a categorical variable to a cell array to...

plus de 7 ans il y a | 1 réponse | 1

0

réponse

Réponse apportée
reading a very large number of csv files
Try https://www.mathworks.com/matlabcentral/fileexchange/10959-sort_nat-natural-order-sort and see if it will solve your probl...

plus de 7 ans il y a | 1

Réponse apportée
rank keywords using length
[~,il]=sort(l,'descend'); K>> s(il) ans = 16×1 cell array {'third-greatest'} {'humanitarian' } {'Brussel...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Get the first row in a table with grouped data
[~,ig]=findgroups(D.key); [~,ig]=ismember(ig,D.key); results in: >> D(ig,:) ans = 3×4 table key Date Height ...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
Converting table to matrix
" from excel using readtable and now I need it into matrix form so I can plot the data a certain way " More than likely that is...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
How to import a txt file from a subfolders (not included in path)
You pass a qualified filename -- it can be fully-qualified or partially, as long as it is unambiguous and refers to the correct ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
reading content of a text file by readtable
Given the long conversation after the first rudimentary "throwaway" solution, I'll post a more general and robust solution as se...

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
counting the number of values in table if the condition satisfies??
xx = categorical({'computer'; 'car'; 'mobile'; 'bus'; 'tree'; 'jeep'}); u='car'; [ia,ib]=ismember(u,xx); if ia count=numel...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Read in dates (for timestamp) from file names
Just parse the filename itself... fmt='yyyyMMMdd_HH-mm-ss'; tstr=cellstr(strvcat(d.name)); file_timestamps=cellfun(@(x) datet...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to extract numeric values form multiple text files into a single dynamic array?
It's always easier if we can see a piece of a file so know exactly what the form is, but... Your error is that you're trying to...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Export cell array into Excel
C=num2cell(cell2mat(data_1.')); xlswrite(file,C,sheet,range)

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
reading content of a text file by readtable
function t=readRunFar(file) % return table containing data from input file fid=fopen(file,'r'); % read the two sections -...

plus de 7 ans il y a | 0

Réponse apportée
Can I use "fitnlm" for multiple regression ? and How?
Well, I take that back...actually you could do it with fitlm if you do a change of variable... u1=x2.^n; u2=x3.^n; t=table(x...

plus de 7 ans il y a | 0

Réponse apportée
How do I make a smooth curve using the following data?
Presuming you first convert your data to arrays from cell array... plot(x1,y1,'x',x2,y2,'s') % plot the data only X1=l...

plus de 7 ans il y a | 1

Réponse apportée
read file with ascii characters and binary data on one single line
As noted in the comment, it's bizzaro way to have done, but the following seems to work... >> l=fgetl(fid);while ~contains(l,'#...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Counting occurrences of a pair of numbers in a logical vector
Mayhaps one can get more cleverer, but I'm all for just "git 'er done!" ix=reshape(find(A),2,[]).'; B=zeros(size(A)); for i=1...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
Plotting scale bar with vertical margins
X=[0.2,0.1]; Y=[0.9,0.75]; E=[0.15,0.05]; % positions, bar length about midpint hEb=errorbar(X,Y,E,'horizontal','b.', 'l...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Alternative to 'find' which won't return multiple values?
If you're using R2017b or later... [~,i10mx]=maxk(topfit,10); % return 10 largest positions in topfit vector topstac...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
how can I write two matrix into the same csv file
There's nothing in the documentation for writematrix that should have led you to think you could possibly do what you're asking ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
how to use excel data in matlab for fast fourier transform?
[V,H]=xlsread('Vibration_analysis_FFT.xlsx'); % read data H % headers -...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Return character array with increasing size based on input
strt=input('Starting letter: '); N=input('Number groups: '); % do your error checking here to ensure a single starting charact...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Select which legend entries to use depending on data set plotted
... for positionnumber=[1:5] filename=strcat('M1_G1_','P',num2str(packagenumber),'_',num2str(positionnumber),positionl...

plus de 7 ans il y a | 0

| A accepté

Charger plus