Answered
How can I write a script to ask user to input any function which the script then calculates forward difference
doc input doc eval Caution -- be careful; will evaluate whatever the user enters which may allow unintended consequences w/...

13 years ago | 1

Answered
Is the loop getting skipped? I wanted las to take last array of trk with a value in it. but for some the loop seems to get skipped.. What am I doing wrong? Can someone please help??
for roll = 7:1 Above is equivalent to for roll = 7:1:1 what happens when add +1 to 7 and the test for another pas...

13 years ago | 0

| accepted

Answered
Help with quadriatic formula?
You showed enough I'll do more than normally would on first response... s=inputdlg('Enter quadratic: ','Quadratic Solver In...

13 years ago | 0

| accepted

Answered
How to check if a path exists
doc exist

13 years ago | 0

Answered
Interpolate between two lines
Since 10 is midpoint between 5 and 25, linear interpolation would simply be the average. But, in general, *interp1* is your fri...

13 years ago | 1

| accepted

Answered
Reading .dat file with multipe headers
doc textscan If it were me I'd not read the titles unless they're variable and unknown or if they are needed to be obtained...

13 years ago | 0

Answered
double y axis bar chart to have bars next to each other
Well, I think it's much more informative as bar(x1', [y1' y2']) but suit yourself. As a starting point try ha=plot...

13 years ago | 0

Answered
Working with incompatible data types
From help uint64 "You can define your own methods for the uint64 class (as you can for any object) by placing the app...

13 years ago | 0

Answered
loop for assigning columns from a textfile
Use a return variable... x=load(['complete_diagr_00.txt']); % load first to get size... x=[x zeros(length(x),9)]; ...

13 years ago | 0

Answered
Trouble Formatting fprintf Table
Put the position of the numeric fields in wrong place... >> fprintf('Temperature (C): %3.0f Voltage (volts): %2.0f \n',[T,V...

13 years ago | 1

Answered
Truncating Data Sets of Different Size
Given x,y,z as the three data vectors, lmin=min([length(x) length(y) length(z)]); Now just use [x|y|z](1:lmin) ...

13 years ago | 1

| accepted

Answered
Extracting phase information from FFT
doc angle doc unwrap % Signal Processing Toolbox

13 years ago | 0

Answered
Setting a pie chart background to white
The background for the pie chart is the figure 'color' property, not one for the axes object. set(gcf,'color','w') % or u...

13 years ago | 0

Answered
what's means this error?
As the error says, you have to have an initial condition value for each equation in the integrated system of equations. Your fu...

13 years ago | 0

| accepted

Answered
Help reading and cleaning data from text file
>> fmt=repmat('%s',1,6); >> c=textscan(fid,fmt,'delimiter',' ','headerlines',5,'collectoutput',true); >> fid=fclose(fid); >...

13 years ago | 1

| accepted

Answered
Delete lines from text file
Read line 1:x from 1 and copy to the second. Close the second. Done. Alternatively, rather than line-by-line, read the whol...

13 years ago | 0

Answered
printing string arrays in figure
annotation('textbox', [0.2 0.4 0.1 0.1], ... 'String', t1(k), ... Use t1(k,:) instead or make the strings into cell ...

13 years ago | 0

Answered
matching elements between two arrays
Ignoring the problem that you don't have commensurate numbers of members of the NG vector for the length of the E vector, presum...

13 years ago | 0

| accepted

Answered
What is missing from MATLAB?
Fortran-like FORMAT statement for (primarily) input parsing... Amongst other things, allows for fixed-width fields directly w...

13 years ago | 2

Answered
Can I improve my result using Linear Model.stepwise but how can I use 'polyijk' with my example?
warning(message('MATLAB:polyfit:RepeatedPoints')); In polyfit at 74 Warning: Polynomial is badly conditioned. Add points ...

13 years ago | 0

Answered
Not all cell converte to double
>> sscanf([list{:}],'%d.txt') ans = 6 13 14 19 45 53 >>

13 years ago | 1

| accepted

Answered
Calculate standard deviation given frequency counts rather than sample
One way, >> m=dot(a(:,1)',a(:,2))/sum(a(:,1)) m = 2.8667 >> s=sqrt(dot([[a(:,2)-m]'].^2,a(:,1))/(sum(a(:,1))-1)) s ...

13 years ago | 2

| accepted

Answered
changing a value in an array with matrix indices
Other than you preallocated a 1D (column) array and then wrote access to it w/ three subscripts, the expression i_i(a_a(2,1...

13 years ago | 0

Answered
append the content of a txt to the end of a txt....
Which OS? Under Win, I'd just use system('copy 33.txt+content.txt') To make a new target file, also specify a destination...

13 years ago | 2

Answered
How to delete elements in array efficiently
When doing such in loops, start at end and work to beginning -- then the indices of those removed are above where you're headed ...

13 years ago | 2

Answered
How to use system ()
*which* is a Matlab function, not a system command Use dir() recursively instead.

13 years ago | 0

Answered
Smoothing piecewise sin functions
Instead of trying to mung on the result of mismatching frequencies caused by the discontinuous _mult_ value as you have, redefin...

13 years ago | 0

Answered
Read text file and store in .mat file
data=importdata('yourfile.txt'); Use the data as is... doc save % and friends to write/read .mat files... If the dat...

13 years ago | 3

| accepted

Answered
Plot Label Format Display
Use the *[x|y]ticklabel* property to write them explicitly...for purpose of illustration-- axes ylim([10000 40000]) y...

13 years ago | 0

| accepted

Answered
Invalid file properties returned by dir
_... why it is empty_ That's up to whatever created it and/or left it that way. Likely candidate would be an open w/ wri...

13 years ago | 0

| accepted

Load more