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

más de 6 años hace | 0

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

más de 6 años hace | 1

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

Respondida
Converting a string into a numerical array
v=str2num(extractBetween("[1,2,3,4,5]",'[',']'));

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 0

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

más de 6 años hace | 1

| aceptada

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

más de 6 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

Respondida
How to add hat symbol to "xtick"
Have to escape LaTex sequences with "$$" before and after...try something like hAx=axes; xlim([1 3]); xticks([1:3]) % a samp...

casi 7 años hace | 2

| aceptada

Respondida
How to plot a polynomial function, having the ordinate coordinates symmetrical about the abscissa (horizontal line)
Well, it's not too hard to get reasonably close...you don't have enough points on yours for the smooth line...the following code...

casi 7 años hace | 0

Respondida
find minimum value of a two-variable equation on an interval.
"...is there anyway I can delet[e] the dot but the equation can still work?" Ah! Indeed I didn't follow along the nub of the q...

casi 7 años hace | 0

| aceptada

Respondida
Hiding Plot Elements makes those elements appearing in the legend and the legend itself a much lighter shade than it should be. How to fix this?
OK, wasn't too hard to take yours and make an example... figure(1) colormap jet hAx(1) = subplot(5,5,[1,2,6,7]); yyaxis le...

casi 7 años hace | 0

| aceptada

Respondida
Write multiple vectors into .dat file
Simplest, presuming they're the same length would be to write as 2D array. I'd write as column instead of row.. writematrix([x...

casi 7 años hace | 1

| aceptada

Respondida
Extract numbers from lines in a txt file. Onset times from experimental data.
Carrying on from the above that just diddled with the file format to be able to get the data; the following seems to work: file...

casi 7 años hace | 0

| aceptada

Respondida
log-log plot explained
You have created such...what's the problem? Probably the issue is that your data don't cover a sufficient range in either x or ...

casi 7 años hace | 0

| aceptada

Respondida
Extract numbers from lines in a txt file. Onset times from experimental data.
The problem is the file contains double-byte characters and ML isn't interpreting them ... >> txt=importdata('Imagine_simple-1-...

casi 7 años hace | 0

Respondida
Create a logistical variable based on time range
readtable is a convenient byway on the way to a timetable which will undoubtedly be your friend... tt=readtable('Forum_aq_data....

casi 7 años hace | 0

| aceptada

Respondida
Plotting an array of vectors
Your data are nothing at all like that of the other figures; hence it's not surprising they don't plot similar-looking graphs. ...

casi 7 años hace | 0

Respondida
Sum across columns with shift
May be some other more clever indexing, but the "deadahead" thing that comes to mind if I understand the desire >> a=1:18;a=res...

casi 7 años hace | 1

| aceptada

Respondida
Scatter Plot with different "markers" and "data labels"
Adam posted first but will add slightly different way to get to same place (sans some of the finishing niceties...) Why scatter...

casi 7 años hace | 1

Cargar más