Answered
writing complex to a file
>> z z = 2.7247 + 0.0875i 7.7582 + 0.3089i 3.3141 + 0.2309i 6.0307 + 0.9092i 1.8401 + 0.9369i >> fmt=['%.2f + %....

12 years ago | 0

Answered
Problem with calling the function
_...why in allparts do not indicate the input arguments..._ Because that's the way the assignment was written--actually I see...

12 years ago | 1

| accepted

Answered
Latex Interpreter in X axis
No help, sorry. 'xticklabel' does _NOT_ use the TeX/LaTex interpreter (as you've discovered). You'll have to write the tick ...

12 years ago | 0

| accepted

Answered
how to find the time lag in cross correlation
*xcorr* returns a 2*M-1 cross-correlation sequence for a vector length M from lags [-M:M] w/ the zeroth-lag in the middle of the...

12 years ago | 1

Answered
May you guys help me I got stuck in developing a simple code... (solving diferential equations by using ode45)
_...I thought putting it all in a new window and executing it it would work..._ I don't know what you mean by the above. If ...

12 years ago | 1

Answered
creating a vector that repeats a number 360 times
A zillion different ways to do this--just a few of the more obvious are v=500+zeros(360,1); v=500*ones(360,1); v=repm...

12 years ago | 7

Answered
Generate three dimensional arrays using mvnrnd in Matlab?
From help mvnrnd ... R = mvnrnd(MU,SIGMA,N) returns a N-by-D matrix R of random vectors chosen from the multiva...

12 years ago | 0

Answered
How to correct this problem?
Fixup the directory structure to match that of the downloaded app or change the directory string apparently stored in _s1_ to ma...

12 years ago | 0

Answered
Why Saveas appaer a error sometimes
saveas(H,[path_res 'Delta Tension (V) At 5V and ' num2str(Frequency) 'HZ'],'fig'); Your filename contains embedded blanks....

12 years ago | 1

Answered
How can I make make axis size change accordingly as i change the size of the figure?
The default position of the axes object within the figure is in percentages of the figure size; if you change the figure size by...

12 years ago | 0

Answered
I have a matrix A=[1 2 3; 1 2 9; 2 3 4]. I want a matrix B whose column 1 is equal to 1. How can I do this? B=[1 2 3; 1 2 9]
B=A(A(:,1)==1,:); Lookup "logical addressing" in documentation for details on how this works--it's important Matlab syntax....

12 years ago | 0

| accepted

Answered
How does REGSTATS compute mse?
DOF = 0 so the denominator is zero--> inf for the mse. Try with x = [1:2:N]; y = x.^2; instead, for example, for ...

12 years ago | 0

Answered
Find Which Column contains a pattern
>> loc=find(cellfun(@(str) ~isempty(strfind(str,'.:')),survey),1) loc = 5 >>

12 years ago | 0

| accepted

Answered
Integrate a Discontinuous Piecewise Linear Function
_...Am I missing a more straightforward way of performing this integration..._ Since the intervals are constants, just define...

12 years ago | 0

| accepted

Answered
how to avoid overwriting the images while using imwrite() ?
outputBaseFileName = sprintf('%s_converted.tif', baseFileName); % original file name + converted Add some other changing in...

12 years ago | 0

Answered
How can I append text to a number matrix for export to .txt tab delimited or ASCII file? fprintf is blowing my mind!
nCols = 125; format = repmat('%f', [1 nCols]); fileID = fopen('07N15_T70_Naive_P7sd.txt'); C = textscan(fileID, format, ...

12 years ago | 0

| accepted

Answered
How can plot the residuals as vertical distances from the data point to the fitted curve
If your data are x,y and yh the predicted values, then scatter(x,y) % the data circles hold on plot(x,yh,':') % the ...

12 years ago | 1

| accepted

Answered
the code doesn't update the values
Of course it does, it just doesn't do what you think it should, apparently... ADDENDUM- If you're also expecting to build ...

12 years ago | 0

| accepted

Answered
How to join two vectors
>> x2(R(:,1))=R(:,2); >> x2(~ismember([1:length(x2)],R(:,1)))=x1 x2 = 0 -0.5000 1.0000 0 -2.0000 ...

12 years ago | 0

| accepted

Answered
How to make indices integers/logicals while filling 3D matrix with data?
You defined times=0:1.83:((time_length-1)*1.83); %time defined so _times_ are _*not*_ integer-valued, then later on did ...

12 years ago | 0

| accepted

Answered
Multiple switch cases for different operations
n=input('Please enter the figure:','s'); switch n case ('triangle'); n=3; sum=(n-1).*(180); cas...

12 years ago | 0

| accepted

Answered
How to read csv file with asterix
Actually, it's not _too_ bad... >> fid=fopen('noaa.csv','r'); >> l=fgetl(fid); % the header >> to...

12 years ago | 1

| accepted

Answered
how to plot a time on x-axis and height on y-axis and data with respect to time
_...the date and time is in the header..._ Oh, ok...I'm not sure you said that the first go 'round. So, modify the previous ...

12 years ago | 0

| accepted

Answered
How to control dual Y axis
_...I just need another label, I would prefer, if possible,not to get into plotyy and just work with labels..._ Compared to w...

12 years ago | 0

| accepted

Answered
unable to take the value in a array
*g(m)=b;* is the first occurrence of _g_ so it's not been preallocated and you're trying to address a particular (nonexista...

12 years ago | 0

Answered
Opening Sequential .txt Files and Populating Array with Data
Again, once you've got the results from *dir* for the files in question, then use the names as returned therein...that is, inste...

12 years ago | 0

| accepted

Answered
Need help with leading zeroes being eaten in my function
If you read the value as numeric, internal storage is what it is; there are no "leading zeros". The only way you can do somethi...

12 years ago | 0

Answered
How difficult would creating this automated graphing program be?
If you're willing to use the gui components in an overall script and not worry about having a full graphics app, it's essentiall...

12 years ago | 0

| accepted

Answered
How can I check whether the strictly positive elements of each row of a matrix are equal?
The "deadahead" solution... isPos=false(size(A,1),1); for i=1:size(A,1) isPos(i)=all(diff(A(i,A(i,:)>0))==0); en...

12 years ago | 0

Answered
Loading .txt that are in a cell array
I'd more go like... wd='D:\Desktop\BOP Metingen\Proefpersoon2'; % the directory location d=dir(fullfile(wd,'*.txt'); ...

12 years ago | 0

Load more