Answered
How to pass and access an structure array in mex
<http://www.mathworks.com/help/matlab/matlab_external/passing-structures-and-cell-arrays.html> Why not go to the MATLAB doc...

12 years ago | 0

Answered
Use element values for IF statements
A basic use of "logical addressing"... ix=B>100; % the logical condition vector A(ix); % the substitution You can, o...

12 years ago | 1

Answered
defining the position of input file
See FAQ at <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

12 years ago | 1

Answered
Taking unique numbers of a set and order them with their respective number
>> unique([angle radius],'rows') ans = 0 2 1 4 2 3 3 7 4 3 5 6 ...

12 years ago | 0

Answered
How can I plot mixed data types of a csv file ?
Presuming _do_ have the Statistics Toolboxen... >> [a,g,d,f]=textread('bara.csv','%*d%s%s%s%d','headerlines',1,'delimiter',...

12 years ago | 1

Answered
How do I calculate FWHM from a histogram?
Use one of the distribution-fitting functions or the interactive tool *dfittool* instead to get the parameters of the result fro...

12 years ago | 0

| accepted

Answered
Reading in a text file with date and time
[m,d,y,h,mn,disch]=textread('discharge.dat','%d/%d/%d %f*'); doc textread doc textscan doc fscanf help iofun ...

12 years ago | 1

Answered
Why do regression coefficients obtained from Excel and Matlab differ?
_...want to run a polynomial regression of order 15._ *very*, *Very*, *VERY*, bad idea!!! The differences are caused by nu...

12 years ago | 2

| accepted

Answered
basic ploting histogram with a label
1) set(gca,'xtick',[1.1 1.9 2.9],'xticklabel',{'A1','D1','G3'}) NB: x values based on observed midpoints in figure 2) ...

12 years ago | 1

| accepted

Answered
Importing three dimensional text data.
x=textread('datafile.dat'); % read the data (2D) into an array -- *textread* will do nicely x=reshape(x.',30,8,[]); % ...

12 years ago | 0

Answered
meaning in matlab help example of textread " Read Using Literal to Ignore Matching Characters"
Data file contains 1,2,3,4,,6 7,8,9,,11,1 Note there are two consecutive commas between 4 and 6 in first row and aga...

12 years ago | 0

| accepted

Answered
check if a variable in a structure exist
isfield(handles,'Y2') doc isfield % for details help struct % for reminder on structures

12 years ago | 12

| accepted

Answered
Problem with importing excel data.
That's _not_ why the plot isn't working--the data internally is full precision, only the display at the command line uses the fo...

12 years ago | 0

Answered
Analyzing the FFT graphs in MATLAB
1) FFT as implemented in Matlab uses the N points given so your first "Since ..." conclusion is wrong. What happens is you get ...

12 years ago | 0

Answered
IF cell of a dataset equal to text
One (of many) way(s) to write it... ix=strcmp(T.c1,'FOREX') & T.c4<0; T(ix).c2=T(ix).c3; ix=strcmp(T.c1,'FOREX') & T....

12 years ago | 1

| accepted

Answered
Errors in my program with mpower and mtimes
Error in ==> PartA at 6 k1 = int((x/(25*((8*3.14).^(1/2)))*(e.^((-(y-x).^2)/8))),x,0,5); Looks like you're missing the 'd...

12 years ago | 0

Answered
Extract model's p-value from fitnlm
My release doesn't include *fitnlm* so can't test but doc page indicates that you can recompute the p-values of the various stat...

12 years ago | 0

Answered
Matrix formed of a string vector and a double vector
Because you implicitly did a cast to *char()* when you wrote M-- >> M = [namen, no] >> whos M Name Size ...

12 years ago | 0

| accepted

Answered
concatenating several mat file into one
Presuming by "math" files you mean a Matlab .mat file, d=dir('*.mat'); % get the list of files x=[]; % start w...

12 years ago | 3

| accepted

Answered
Displaying names vertically on the x axis
*bar* first -- call *bar* with the data in an array and use the 'grouped' option. See examples at doc bar for options w...

12 years ago | 0

| accepted

Answered
subtract and save in a file and then plot
b=[a(:,1:4) a(:,5)-10+a(:,4)]; Read the "Getting Started" section in the Matlab documentation and work thru the examples on...

12 years ago | 0

Answered
How can I read a binary file with mixed formats in Matlab?
m = memmapfile('file.dat', 'Format', {'uint8, [1 32] 'chdata'; ... 'single' [1 1] '...

12 years ago | 2

Answered
fprintf has been giving blank files
Well, again the example shows you how but you don't seem to pay any attention to it--look at the example format string again and...

12 years ago | 0

Answered
Stack plot or multiple y plot
doc subplot Adjust boundaries to fit the axes ADDENDUM: Sorry, didn't have time to demo before -- here's a rough cut ...

12 years ago | 1

Answered
how to take out specific month from data
As noted above, you were already there-- dten = datenum([2006 1 1 ;2100 12 31]); [~,M] = datevec(dten(1):dten(2)); p =...

12 years ago | 0

| accepted

Answered
[SIMPLE] How to make matlab find the difference of a set of strings in a 1 column matrix
>> [u,~,ic]=unique(c); >> histc(ic,1:length(u)) ans = 3 3 2 >> u ans = 'T-NI-UA-kunde1-1' 'T-...

12 years ago | 2

Answered
How to plot average day from monthly data
[v,d,m,y,h,mn]=textread('abe.dat','%dveh - %2d/%2d/%2d %2d:%2d','headerlines',1); vbar=mean(reshape(v,24*60,[])); plot(vba...

12 years ago | 1

Answered
I have an array of angles and I need to identify periods where this array is above or below certain thresholds
ix= (x<15 | iswithin(x,166,194) | x>345; where used the "syntactic sugar" of help function for the compound condition to ma...

12 years ago | 0

| accepted

Answered
multiple linear regression, n-by-n vector of observed responses
The loop over columns is one way, yes, but you can also do it in "one swell foop" using the "\" backslash operator *mldivide* fo...

12 years ago | 0

Answered
How do I use text for ticks on X axis?
names = {'CRHS'; 'ELLY'; 'LGWD'; 'ECFS'; 'THMS'}; plot(... set(gca,'xtick',[1:5],'xticklabel',names) Set the tick val...

12 years ago | 23

| accepted

Load more