Answered
Extra variable when opening a file using readtable.
Even without seeing the files, with almost 100% certainty there's an extra delimiter at the end of the record which makes it loo...

9 years ago | 0

| accepted

Answered
How to draw and delete a line in a graph
# for each step, the region have to always be visible -- the plot axes will auto-range to include the data. If the magnitude of...

9 years ago | 0

| accepted

Answered
What is missing from MATLAB?
|textscan| has only limited subset of the allowable formatting strings -- specifically, '%X' for hex data is missing. Why? Are...

9 years ago | 1

Answered
Combining For Loop outputs into a Matrix
With a loop, you just index... b = 0:3; XY=zeros(3,length(b)); % preallocate the output array irow=0; ...

9 years ago | 2

| accepted

Answered
How to get Matlab to print both values and variable name
Couple of choice depending upon just how you want to use it... As a function, can retrieve the passed variable name with |inp...

9 years ago | 2

Answered
Increasing efficiency of for loop cycling through 2 vectors
I did find a few minutes -- here's one approach that may or may not actually be quicker; I didn't have time for timing exercises...

9 years ago | 0

| accepted

Answered
How can I label the x and y axis in this plot using the name of the Excel columns?
a=xlsread(filename); % only returns the numeric data from the spreadsheet. Look at doc xlsread and use the alterna...

9 years ago | 0

| accepted

Answered
Using XLSWRITE with multiple arrays?
xlswrite('CarData.xlxs',[A B C]) presuming _A_, _B_, _C_ are column vectors of same size as are the variables in the |carbi...

9 years ago | 1

Answered
How can I display images at multiple axes by clicking a pushbutton?
You'll need to save the axes handles for each axes when it is created, then update each in the button callback function. By def...

9 years ago | 0

| accepted

Answered
How can access elements of two cell at one time
data_array=cell2mat(data_cell); will return 256x1024 array (correcting previous inadvertent juxtaposition or row, column po...

9 years ago | 1

| accepted

Answered
how can this return a x2 value that does not meet -1.5<x2<1.5
Your starting conditions are unrealizeable as the argument to the arcsine function is out of range so none of the |if| clause ev...

9 years ago | 0

Answered
Not a valid target for an assignment
... alpha01=[ones(30,1) coefficients(:,2) Y=(returns(n,:)-factors(t,4))'; The opening *[* of the first line isn't ter...

9 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
for ib1=1:nb1; |nb1| is undefined above... start1=bpo1(ib1)/L1*nel1*ndof; for i=1:2; ii=start1+i; for j=1...

9 years ago | 0

Answered
how do you make a function out of a graph
See <http://www.mathworks.com/help/curvefit/parametric-fitting.html?searchHighlight=fitting%20models&s_tid=doc_srchtitle <Param...

9 years ago | 0

| accepted

Answered
How can I write a function that randomly sorts numbers into equal groups?
N=72; G=6; % constants per problem definition rnv=reshape(randperm(N),[],G); % separated into G c...

9 years ago | 1

| accepted

Answered
Get return values from cmd line 'live'
_" Is there a possibility, that you get the values in 'livetime'."_ Short answer, "no". Not from the |system| command route;...

9 years ago | 1

Answered
convert a struct to a mxn cell array
FolderTrain = 'myfolderpath'; % specify the folder AllTrainFiles=fullfile(FolderTrain,'*.txt'); % full path...

9 years ago | 0

| accepted

Answered
Check elements in cell
The line if isequal(NAME_T,'Del Col_2010') inside the loop doesn't help because you don't index the cell array; |NAME_T| returns...

9 years ago | 0

Answered
Difference between num2cell(1:4)' and {'1','2','3','4'}' ?
As the error message says, the cell _content_ must be character string and Adam notes the difference between the two forms you w...

9 years ago | 1

Answered
Converting string to number in table with mixed values
Use a lookup table; since it is the atomic table; build it for completeness(*) once in the app but for the specific case the exa...

9 years ago | 0

| accepted

Answered
How to calculate moving average
<https://www.mathworks.com/matlabcentral/answers/329590-efficient-weighted-moving-average#answer_258475 <Efficient-weighted-movi...

9 years ago | 0

Answered
/n %H as a string
Have to double-down on the control characters to prevent them being interpreted and to print instead... >> str='puts "\\nAna...

9 years ago | 1

| accepted

Answered
How to remove specific axis labels not the nimor ticks from a MATLAB figure?
set(gca,'xtick',10.^[-10:2:0]) For more generic coding set the two limits as variables, say powLo and powHi.

9 years ago | 0

Answered
Please determine the value of the Matlab expression: 25>=(~4|5)||(5-3)
25 >= 1 --> _'True'_, ergo 1 The more important question is probably why would you ask; what isn't obvious?

9 years ago | 0

Answered
Box plot - plotting multiple datasets on one plot
Well, you're not following the documentation precisely which says _"If X is a matrix, there is one box per column; if X is a vec...

9 years ago | 0

Answered
How to merge multiple xls files into a single file with the same worksheet?
Probably simplest presuming the individual sheets aren't terribly big is to loop through and accumulate all the data into one ar...

9 years ago | 0

Answered
How can I extract certain segments of a long matrix and partition them into new matricies
Simply read the full file and throw away the columns that aren't of interest-- data=textread(yourfile,'headerlines',1); ...

9 years ago | 0

Answered
How do I fit negative values to a log-logistic probability distribution function?
The Matlab log-logistic distribution object isn't the extended three-parameter log-logistic distribution used in the subject pap...

9 years ago | 0

Answered
How do I extract certain data from a table?
I'd guess the ID column isn't a float but an integer number; need to ensure you've imported it with sufficient precision to be c...

9 years ago | 2

| accepted

Answered
Hi, How to find the highest of maximum and lowest of minimum value in each period?
Flip sign and find peaks; that will isolate the sections as each minimum appears pretty clean break between periods. Then for e...

9 years ago | 0

Load more