Answered
How can I parse the string to extract numbers into two matrices
This one is trivial...assume _s_ is the string, then >> cell2mat(textscan(s,'T%2dD%3d','collectoutput',1)) ans = ...

11 years ago | 0

| accepted

Answered
Does Matlab has an internal cache for files?
Yes, Matlab does cache functions on first execution. Use clear yourfunctionname to remove the previous version from mem...

11 years ago | 0

| accepted

Answered
How to read specific columns into an array(or a table) from a spreadsheet in matlab?
AFAIK, "no can do" with *xlsread*; it can only pass a single range argument. In Matlab, it's probably simplest to simply import...

11 years ago | 1

| accepted

Answered
How to reshape data for plot?
That there are a differing number of entries per day makes it a little more of a challenge; that they kindly gave you the count ...

11 years ago | 0

| accepted

Answered
How can I export Confidence Intervals to excel sheet?
doc xlswrite

11 years ago | 0

Answered
Plotting from a for loop?
Use the vectors, Luke... :) You're overwriting each pass thru the loop; you can make an array and populate it, but "the Matla...

11 years ago | 0

Answered
Hello! I am trying to use plotyy in a for loop as in the example code below but the points related to the y achses on the right hand side are not being plotted correctly. I looked but I could not find a solution to this answer. Thank you!
OK, dawned on me overnight...use *scatter* instead. Couple alternatives, probably simplest is % build handle to scatter us...

11 years ago | 0

| accepted

Answered
The semilogy plot doesn't show the grid lines ?
grid on % both x- and y-axes or set(gca,'YGrid','on') for only y-axis.

11 years ago | 0

Answered
How do i check, where a curve gets constant after certain time period in 8760 hours graph
Look at delt=diff(y); and where does it become close to zero for a period. Using *find* with the _k,'last'_ optional p...

11 years ago | 1

| accepted

Answered
Piecewise non-linear curve fitting for a specific type of data
I don't have time to write the full model at the moment, but the idea would be "piecewise regression". I showed the two straigh...

11 years ago | 0

Answered
How do I find a value in a vector and then create a new vector with those value?
>> TS1='%@3Gb6'; >> find(iswithin(TS1,'A','z')) ans = 4 5 >> >> type iswithin function flg=iswithin(x,...

11 years ago | 1

| accepted

Answered
how to increase the number of digits for the coordinates of a point in figure when I click one.
I don't see a place to set the default callback; it probably does exist somewhere but didn't find it documented in the time I ha...

11 years ago | 0

Answered
We call this as Script or function
It is a function if the m-file beginning line contains the keyword *function*, otherwise it's a script. <http://www.mathworks.c...

11 years ago | 0

| accepted

Answered
How can ı use PDF as an input in matlab??
See <http://www.mathworks.com/matlabcentral/answers/155500-how-to-extract-data-from-pdf-file-in-matlab#answer_152421 How to e...

11 years ago | 0

Answered
This code gives me a strange plot I cannot figure why. Many thanks for any help
_" I was unable to get this subplot axis problem fixed"_ Don't know why it didn't register with me before, but the problem is...

11 years ago | 1

| accepted

Answered
How can I remove all spaces in a .txt file ?
If you really mean _all_ as in "all"... >> type burak.txt % made a file with your line twice... 08 0C F0 6D 86 EA 44 2D ...

11 years ago | 1

Answered
This code gives me a strange plot I cannot figure why. Many thanks for any help
I noticed the following this AM I missed yesterday -- You're missing the _t_ variable for the x-vector on the RH axes in the ...

11 years ago | 1

Answered
Legend in GUI: Preset string and colors.
I "don't do GUIs" but I'd guess to create a set of hidden lines with the desired characteristics and use them for the legend on ...

11 years ago | 0

Answered
How do I shorten my code to prevent writing the same thing over and over?
if Rpeaks(i)-halfsegment<0 window=(1:Rpeaks(i)+halfsegment); %takes into account that the forces don't start a full halfs...

11 years ago | 0

| accepted

Answered
Using unique fuction on cell array
>> ccc % a sample cell array similar to shown... ccc = '13,14' [10700] '13,14' [ 0] '123' [ ...

11 years ago | 0

Answered
What is the most efficient code for calculating a signal based on voltage time history and a calibration curve.
Use the vectorized form for *interp1* vOut=interp1(vc,yc,v,'cubic'); A comparison showed almost no difference between us...

11 years ago | 0

| accepted

Answered
Linkaxes not working, what can i use?
hAx=zeros(4,1); for i=1:4,hAx(i)=subplot(4,1,i);end linkaxes(hAx) ylim(hAx(2),[0 10]) seems to work just fine here...

11 years ago | 1

Answered
Several Operations Within a Matrix Matlab
Doesn't look to me like the result is really dependent upon the third column at all; it's simply accumulating the like values in...

11 years ago | 0

Answered
using ismember function column by column
Presuming the lists are sorted and to be used concurrently as described, keep an auxiliary counter to "walk" through them... ...

11 years ago | 0

| accepted

Answered
How to extract a page from a 3d array and add it to a 2d array in a for loop?
Firstly, the indices vector _e_ and subsequently _S_ can be built from L=4; for i=1:2:c-(L-1) e=i:i+L-1; ... ...

11 years ago | 0

Answered
How can I get the diagonal elements of a matrix to be 0's
x=~eye(N);

11 years ago | 0

Answered
help me using dlmread
The problem is the ',' in the fields; is it intended to be a decimal point or a thousands separator? Either way, you've got to ...

11 years ago | 1

Load more