Answered
Determine how many times numbers in a certain range were drawn
On the assumption _the (3,1)_ refers to the subscript of the array (and, btw, the "1" is superfluous for the 1D dimension for ve...

13 years ago | 0

Answered
check if figure exists whithout making it appear and using its figure number in findobj()
Since the figure number handles are the integer number, all you really need to do then is use ishandle(n) for the desire...

13 years ago | 7

| accepted

Answered
join numbers in vector
>> sscanf(sprintf('%d',v),'%lu') ans = 13304412442312 >> whos ans Name Size Bytes Class Attr...

13 years ago | 0

Answered
How do I create dynamically changing legend entries based on an unknown number of plots?
I modified your practice code a little...it keeps the legends in order for those used for the SWITCH construct--there's not enou...

13 years ago | 0

| accepted

Answered
Plot 2D is missing some Data Points
set(gcf,'renderer',['opengl'|'zbuffer']) Use one or other, of course, not literal... set(gcf) or set(gca) ...

13 years ago | 0

| accepted

Answered
PadArray with Odd and Even Rows/Colums
J(3:size(I,1)+3-1,5:size(I,2)+5-1)=I; Have to have the subset area the same size as the insert--means have to compensate ...

13 years ago | 0

Answered
Saving/storing data from plot
If the point is only to save the data for recall at a later time then just use SAVE and LOAD and save as .mat file. You automag...

13 years ago | 0

| accepted

Answered
Sorting data by ascending at sampled points, and using 1-D Lookup table to select highest OR lowest value.
OK, I "know nuthink" as per Sgt Schultz specific on Simulink but afaik you can use Matlab functions as blocks. To my surprise I...

13 years ago | 0

Answered
Remove rows with NaNs from 2 variables to do a corrcoef and a polyfit
To compute the R-square you've got to compute the two SS terms -- SSe and SSt, the SSerror and SStotal, respectively If have ...

13 years ago | 0

| accepted

Answered
How to pass a value to TIMER function
Create a timer setting type and period initially... rate=10; % a repetition rate ht=timer('ExecutionMode','fixedrate', ...

13 years ago | 0

Answered
Inputting Numerical Matrix Values into Function Handle
No can do... From the documentation on anonymous functions... _... the function handle includes those values. The values p...

13 years ago | 1

Answered
How can I save workspace variables from starting to the close of matlab i.e., as long as matlab is running, all variables will be saved.
Not implemented. Autosave works in the code editor if preferences are set but no equivalent for the workspace. There is a ...

13 years ago | 0

Answered
check if figure exists whithout making it appear and using its figure number in findobj()
Most basic is simply (assuming hfig is the handle you're looking for) ismember(findall(0,'type','figure'),h) sorts out f...

13 years ago | 0

Answered
How do I create dynamically changing legend entries based on an unknown number of plots?
Save the handles to both the plots and the legend and augment them each pass. hplt=plot(x,y); hleg=legend('first'); ... ...

13 years ago | 0

Answered
Remove rows with NaNs from 2 variables to do a corrcoef and a polyfit
If the concern is over the slopes of the linear fit, there's nothing that says limits its magnitude; that'll be wholly dependent...

13 years ago | 0

Answered
Elegant way to return point a specific value occurs at in a vector
Sure... Slopes = diff(D)./diff(T); [MaxSlope,ix] = max(Slopes); vMxSlope=D(ix); % duplicates loop wrt b...

13 years ago | 0

| accepted

Answered
How can I plot multiple data sets from different files all on the same plot?
... for i=1:length(times) if AOI(i)==1 ... elseif AOI(i)==2 ... elseif AOI(i)==3 ... ...

13 years ago | 0

| accepted

Answered
Getting x value for a given y value from a fitted model
A) Evaluate the function over a range of x and then use interp1 to interpolate over the response to find a given x that gives a...

13 years ago | 0

| accepted

Answered
PadArray with Odd and Even Rows/Colums
>> help padarray padarray not found. >> So, don't know what it is; apparently after R2012b. But C=logical(zeros(...

13 years ago | 0

Answered
index out of bounds
for c = 1:info.conditions.number Trl_p = [Confirm_Channel.cfg.trl(juju(c)+1:juju(c+1),1:3)]; The error message in...

13 years ago | 0

Answered
How do I change the x-axis tick marks and grid lines to occur every minute for a plot?
Set the 'xtick' property to the datenum values determined from the date/time from xmin:xmax desired. Easiest is to just use the...

13 years ago | 0

Answered
How can I open a text file, and then read in the headers of that text file using textread? (Errors 166 and 67)
[fileName1 pathName1]= uigetfile('~/*_gyro_out_Z.txt',... Z.txt'); filepath=fullfile('pathName1','fileName1'); The sec...

13 years ago | 0

| accepted

Answered
Integration extreme value theory
The integral is gevcdf() for the gevfit() parameters...simply plug in the upper limit for integral to whatever upper limit value...

13 years ago | 0

Answered
what happen when I Divide 1:3/4:6 ??
when i type this : 1:3/4:6 Read section "operator precedence" in the Matlab section on arithmetic operators. Followed ...

13 years ago | 0

Answered
semilogy tick marker is missing
Don't set the lower limit to 0.2 as it appears you have, leave it at 0.1 IOW, use ylim([0.1 20]) instead of the ...

13 years ago | 0

| accepted

Answered
How to make a weighted histogram with specific bins?
edges=unique(data); % vector of unique values n=histc(data,unique(data)); % to get bin counts w/ bins specified ba...

13 years ago | 0

| accepted

Answered
Read multiple files and concatenate
_...3201.rad to 3396.rad, and by doing the the sprintf(3%ddd.rad,i),.._ '3%ddd.rad' as a format string will output '3201dd.ra...

13 years ago | 0

Answered
Vectorizing a for loop?
For your A1, B1 and npan1=2, >> bsxfun(@times,A1+(B1-A1),[0:npan1]'/npan2) ans = 0 0 0 -1.6667...

13 years ago | 2

| accepted

Answered
Contiguous Number Checking and Verification
OK, just change the function slightly... MATL >> [~,~,c] = unique(a(:,3)); >> nmiss=accumarray(c,a(:,4),[],@(x) length([m...

13 years ago | 1

| accepted

Answered
I have a cellArray data. Could you tell me how I can extract the first column of this cellArray data without depending any character and number?
MATL >> t=textscan(char(cellArray),'%s %*[^\n]'); >> reshape(char(t{:}),length(cellArray,[]) ans = A29G0202 A29G0008 A29...

13 years ago | 0

Load more