回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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); ...

7年以上 前 | 0

| 採用済み

回答済み
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)...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 5

| 採用済み

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

質問


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

7年以上 前 | 0 件の回答 | 1

0

回答

回答済み
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...

7年以上 前 | 1

回答済み
rank keywords using length
[~,il]=sort(l,'descend'); K>> s(il) ans = 16×1 cell array {'third-greatest'} {'humanitarian' } {'Brussel...

7年以上 前 | 1

| 採用済み

回答済み
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 ...

7年以上 前 | 2

| 採用済み

回答済み
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...

7年以上 前 | 2

| 採用済み

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 3

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
Export cell array into Excel
C=num2cell(cell2mat(data_1.')); xlswrite(file,C,sheet,range)

7年以上 前 | 0

| 採用済み

回答済み
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 -...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 1

回答済み
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,'#...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 2

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 1

| 採用済み

回答済み
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 ...

7年以上 前 | 0

| 採用済み

回答済み
how to use excel data in matlab for fast fourier transform?
[V,H]=xlsread('Vibration_analysis_FFT.xlsx'); % read data H % headers -...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
Correlation Coefficient between multiple table columns
Try doc corrcoef % see examples re: NaN When you're still learning way around Matlab, a very useful (albeit old and prett...

7年以上 前 | 2

回答済み
Plotting Matrix with Small and Large Values
'Kay; that's what I surmised...on one plot it's probably going to be messy no matter what you do. Two options I can think of Us...

7年以上 前 | 1

| 採用済み

さらに読み込む