Réponse apportée
A loop for multiple .xlsx files import with different names
Your wildcard specification dir(fullfile(source_dir, '*.xls')) will only find files ending in precisely 'xls' and your text says...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Find more time-efficient way to extract data from a .txt file
While I'm convinced you really don't need the files at all and probably with only a minor amount of rearranging if it works as i...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Validate and get exact number of characters using the regular expression
I can get you closer, but not exactly right... regexp(s,'-\d{2}\>','match') will return only matches of exactly two digits aft...

plus de 6 ans il y a | 0

Réponse apportée
Create a randomized grouping matrix using one-liner
Without the constraints, and without initialization, >> R=[1:N].'; C=randi(M,N,1); % N,M num rows, columns respectively ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Constants and Matlab Workspace
I've never seen an installation of Simulink but I'm sure it and MATLAB do not share the same workspace...a search finds lots of ...

plus de 6 ans il y a | 1

Réponse apportée
inserting long xtick label
Don't label manually at all; use a datetime variable for the x-axis variable in plot() and you'll get datetime ticklabels automa...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find a substring within a miscellaneous cell array?
Alternatively, string can convert numerics... >> contains(string(C),"Full") ans = 1×8 logical array 0 1 0 0 0 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find the position of a real vector in a matrix?
>> find(ismember(A,v,'rows')) ans = 1 >> works here, but in general for floating point values >> find(ismembertol(A,v...

plus de 6 ans il y a | 0

Réponse apportée
Get daily max values from timetable keeping the other variables from 'maxed value' row.
OK, just use the "deadahead" solution... ttMAX=varfun(imax,ttbruto,'InputVariables','CAUDAL_XARXA','GroupingVariables','DOY'); ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I just plot a single specific point on a graph?? No answers on here have been helpful!
"want to only plot the maximum power" ... Power=amps.volts; [Pmax,imax]=max(Power); plot(time(imax),Pmax,'or','MarkerFaceCol...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to add two different lengend boxes for 'yyaxis' plot ?
Just label 'em all...the line types will show up...wait until are done. Comment out the two legend() calls you have and put the...

plus de 6 ans il y a | 1

Réponse apportée
I have to do matrix with 'single' vectors
The values don't change, only the display format so you get something other than zero displayed for numbers smaller than the pre...

plus de 6 ans il y a | 0

Réponse apportée
How do I filter text in a table?
Don't attach images; use text from command line instead, or attach a small set of the data itself. As for the Q? ix=startsWith...

plus de 6 ans il y a | 0

Réponse apportée
Extract Last two Words from strings in cell
> arrayfun(@(s) s{:}(end-((numel(s{:})-1)>=1):end),arrayfun(@(s) split(s).',S,'uni',0),'uni',0) ans = 4×1 cell array {1...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Split csv/excel files into two separate files based on trigger word which always appears in the first column, but not always the same row
I'd probably use xlsread(*) to return column 'A:A' raw data as cell array, search that column for the key word, then use that lo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to make this text string column program faster?
Dunno how much better; still think to build the struct so all fields are extant would be far better; then you can use an array o...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to search particular word for ex. 'Home' in csv file and print it.
Is no builtin text search routine for files; using the system grep utility or like is a very good way to do this if is just to s...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
I need matlab code to generate smooth curve for data set
There's a way to save the results of the fit session to the command window, but I always have to figure it out and it's more tro...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Converting a string into a numerical array
v=str2num(extractBetween("[1,2,3,4,5]",'[',']'));

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
size of matrices in a struct
A loop is involved, yes, but you can write it w/o coding the loop explicitly. Part depends upon just what it is you want; what ...

plus de 6 ans il y a | 0

Réponse apportée
Create a single average day out of hourly data (33days)?
"First row is date second is hourly mean temp." That would be column, not row, as just a nit. Yes, either groupsummary or varf...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Stress testing to find parameters uncertainty
See some previous answers to the question... <<Answers/415341> and <Answers/120978> The comments by @SK go to the question of ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Unusual size of saved variable as .mat file
"I expect ,the size of this structure ... not to be much much bigger than my data..." That's perhaps a reasonable expectation o...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
any suggests, solutions ?
Jeremy is correct... ncparamteres.m would contain: %ncparamteres.m % Script to create variables in the calling MATLAB works...

plus de 6 ans il y a | 0

Réponse apportée
How can I find the best curve of a set of curves to fit data points?
How can there be a question of "which one is best"? You have a physical model and one constant, k, to estimate so a least squar...

plus de 6 ans il y a | 0

Réponse apportée
How to create a fit like 1/(x^n)
Of course, the above can be linearized by log transform... b=polyfit(log10(x),log10(y),1); >> b(1), 10^b(2) ans = -1.44...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Merge a selected rows to creat a single row
EDITED for ROW ORDER CORRECTION -- dpb function X=reshapeNperRow(x,Nper) % X = reshapeNperRow(x,Nper) % reshapes input array ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Append lines to interrupted CSV file by calculating new values while ignoring lines that have text information
Functional, but somewhat more in the MATLAB spirit...using vectorized operations in contains function and input/output... chrs...

plus de 6 ans il y a | 0

Réponse apportée
How can i convert my data into matrix vectors?
dataExp=[2741.8, 2760.5, 3006.8, 3140.8, 3422.6, 3854.6, 4424.6, 4699.4, 4922.4, 5596]; dataNum=[2721.9, 2753.8, 2989, 3122.2, ...

plus de 6 ans il y a | 0

Réponse apportée
''Unable to perform assignment because the left and right sides have a different number of elements.''
ts(1)=t(max(find(f1>=tolerance))); and friends can return an empty RHS if no element satisfies the condition.

plus de 6 ans il y a | 0

Charger plus