Respondida
How to make a script so I can choose a file from folders
While it's only documented by a very terse example, the builtin dir function will recurse directories if the search pattern cont...

más de 5 años hace | 0

Respondida
Get a subset of columns from a timeseries object as a timeseries
plot(u.Time,u.Data(:,1)) "But isn't there a simpler way similar to how I would plot a timeseries with only one variable?" Once...

más de 5 años hace | 1

| aceptada

Respondida
how to split a table to multiple table?
>> CT=reshape(CT,4,4,[]) CT(:,:,1) = 196 296 305 305 317 291 234 196 246 229 313 313 333 17...

más de 5 años hace | 1

| aceptada

Respondida
extraction of numeric data with presence of text data
fid=fopen('abc.txt','r'); abc=textscan(fid,'%s',inf,'Delimiter','\n','HeaderLines',2,'commentstyle','1','texttype','string'); ...

más de 5 años hace | 0

| aceptada

Respondida
How to read .txt separate by - and in dms format
>> fmt='%f-%f-%fN %f-%f-%fW %f'; >> data=cell2mat(textscan(fid,fmt,'CollectOutput',1,'HeaderLines',1)) data = 46.00 ...

más de 5 años hace | 1

| aceptada

Respondida
using findstr to find what you are looking for
Looks like hard way to go at it to me...I'd just download the data to local file and snarf it up ... eopdata = urlread('https:/...

más de 5 años hace | 0

| aceptada

Respondida
I get date info when plot a Datetime in x-axis.
Another case of TMW being too aggressive in hiding things from the end user inside graphics objects -- the year/date 'SecondaryL...

más de 5 años hace | 1

| aceptada

Respondida
Extract a Column from a large csv file
data=readmatrix('forward_turn_and_back.csv','range','AD:AD','NumHeaderLines',N); You'll have to set N for the number of headerl...

más de 5 años hace | 0

Respondida
how to increase the decimal place and it must be side to side as below
fmt=['%0.4f%+0.4fi\t%0.4f%+0.4fi\n']; >> for i=1:size(approx,2) fprintf(fmt,real(approx(i)),imag(approx(i)),real(exact(...

más de 5 años hace | 0

Respondida
Compare two list of strings line by line for a match and summarize results.
Don't need to explicitly loop -- MATLAB has functions builtin to do that for you. readin=lower(string(textread('readin.csv','%s...

más de 5 años hace | 0

| aceptada

Respondida
Compare average monthly stock return data
See the optional 'nanflag' argument to mean-- M = mean(___,nanflag) specifies whether to include or omit NaN values from the ca...

más de 5 años hace | 0

Respondida
Fill in array with different lengths of variables at different locations
The trick for stuff like this is to "grow" from the back to the front -- so the indices you haven't gotten to yet don't change b...

más de 5 años hace | 0

| aceptada

Respondida
How to plot discrete data in a stackedplot
There's a 'PlotType' property in the stackedplot object that has the option for 'stairs' -- none of the previous gyrations are n...

más de 5 años hace | 2

| aceptada

Respondida
How do I compare two graphs for X value at a specific point?
Well, as Star Strider says, the disparity in orders of magnitude between the two makes one truly wonder just how they're suppose...

más de 5 años hace | 0

| aceptada

Respondida
Appdesigner: Writing Data To Excel
writetable returns no arguments and needs the data to output as an argument -- read the doc first... % Button pushed function: ...

más de 5 años hace | 1

| aceptada

Respondida
Combining chart for comparison got error
h1.Children.Children returns a comma-separated list-- >> h1.Children.Children ans = 0×0 empty GraphicsPlaceholder array. ...

más de 5 años hace | 0

| aceptada

Respondida
Writing x values with subscript in the graph
hAx=gca; % save the axes handle -- may want later hAx.TickLabelInterpreter='tex'; % set tick lab...

más de 5 años hace | 0

| aceptada

Respondida
How to extract a column from a matrix by searching
vWant=11; vecRes=matrix_test(:,matrix_test(1,:)==vWant);

más de 5 años hace | 0

| aceptada

Respondida
How to plot discrete data in a stackedplot
You can get creative and use stackedplot to create the axes for you, and then go "handle-diving" to find and modify the content ...

más de 5 años hace | 1

Respondida
Log return of a timetable
To put the computed return at the end time point of the interval, augment the diff vector with a missing-value indicator--- dat...

más de 5 años hace | 0

| aceptada

Respondida
Merge dataset with different lengths
TT = synchronize(DAX,SP500,'intersection'); TT = synchronize(TT,NIKKEI,'intersection'); where DAX, SP500 and NIKKEI are the th...

más de 5 años hace | 1

| aceptada

Respondida
How and where to place the legend box in a "tiledlayout"?
Well, you have to get creative -- the following experiment t=tiledlayout(2,2); % create a 2x2 layout nexttile, pl...

más de 5 años hace | 1

Respondida
Incorporating Multiple Dummy Variables In A Regression Model
Firstly, all have to be column vectors; secondly you'll have to have the same number of observations for each to build an arra...

más de 5 años hace | 1

| aceptada

Respondida
Axis position changes when i use rectangle
I've NEVER understood (and never will understand) the annotation implementation only in absolute units of reference relative to ...

más de 5 años hace | 2

| aceptada

Respondida
Table - keeping specific data
You've got parentheses in the wrong place to do combination of logical addressing, but unless you only want "1" values in the ou...

más de 5 años hace | 0

Respondida
What Takes to Wrap MATLAB function to Use From Excel?
While I didn't answer my own Q?, I'll put an Answer here for any others who stumble over the thread and may be as confused as I ...

más de 5 años hace | 0

Respondida
Why won't my excel file import onto matlab?
You've got a very inefficeint and hard-to-read for a generic code format in the spreadsheet ...there's text scattered around in ...

más de 5 años hace | 0

| aceptada

Respondida
how to create a second x axis with different intervals?
You've actually got three copies of the one axes handle (ax,ax1,ax2); you've never created a second axes. hSc=scatter(rand(10,1...

más de 5 años hace | 0

| aceptada

Pregunta


What Takes to Wrap MATLAB function to Use From Excel?
I've got a MATLAB function that pulls data from an Excel spreadsheet (actually two separate ones) and then writes after processi...

más de 5 años hace | 2 respuestas | 0

2

respuestas

Respondida
re-arrange data
>> C=[{'A'}, {'B1'}, {'X6(1.4M), X15(3M), X25(5M), X50(10M), X75(15M), X100(20M)'}, {' X6~0, X15~1, X25~2, ...

más de 5 años hace | 0

Cargar más