Answered
defining limit for a colorbar after calculating the limit from a given data
mean() max() min() caxis() set(gca, 'CLim', [cLow, cHigh]);

14 years ago | 0

Answered
figures created in a loop are incrementing in size
I don't understand what do you mean by "clear fig;". If you mean close the figure, you need to use close(FigureHandle). "clear f...

14 years ago | 0

| accepted

Answered
textscan and fscanf for text with some rows only text and some rows only numbers
If the numerical data and text strings are in two separate chunks, like the file 'onematrix.reef' you created, function importda...

14 years ago | 0

Answered
writing 1*5 char in one cell in excel
xlswrite('test.xls',cellstr(patients))

14 years ago | 5

| accepted

Answered
loop through each row of data and insert data back & how to preallocate
To pre-allocate, do this after you get the size: monthlyTotals=cell(rows,1) Then to do the assignment, monthlyTota...

14 years ago | 0

Answered
A problem about the Sample Time in the asynchronous subsystem
It makes sense, right? Your "2812_StepTime/Function-Call Subsystem/" is a function-call system, which could be called irregularl...

14 years ago | 0

Answered
xlsread for multiple sheets?
I don't think xlsread() currently supports it. You can use Excel COM server to speed up the process. Follow the link in this ans...

14 years ago | 0

| accepted

Answered
need help reading only the numeric data in a value that contains letters
%% fid=fopen('test.txt','rt'); a=textscan(fid,'%s'); b=regexp(a{1},'\d*','match'); c=cellfun(@str2double,b); d=...

14 years ago | 1

Answered
Randomize set of numbers but don't want more than 2 repeats in a row
a=[]; for k=1:40 a=[a;randperm(3)']; end

14 years ago | 0

| accepted

Answered
Interpolating many matrices without for loop
You can use reshape(). x=1:3; y=3:3:9; X=magic(3); [M,N]=size(X); Y=interp1(x,y,X(:),'linear','extrap'); ...

14 years ago | 1

| accepted

Answered
writing very large .xls file from a cell array
There is a bizarre bug in MS Office that if any of the cell contains more than 911 characters, you'll have that error. I've had ...

14 years ago | 0

Answered
Saving the plotted data into a new image
saveas() or print()

14 years ago | 0

Answered
file name recognition
[PATHSTR,NAME,EXT,VERSN] = FILEPARTS(FILE) returns the path, filename, extension and version for the specified file. ...

14 years ago | 0

| accepted

Answered
Loading and plotting .dat files
How is the data saved? If there is no particular reason, why don't save it as .mat file, instead of the ASCII format? It's much ...

14 years ago | 0

Answered
plot title
"title" is a function so don't use it for variable name. title() needs a string input so all you need to do is to concatenate...

14 years ago | 0

| accepted

Answered
Ploting root locus, when the gain is in the path and not the loop
Combine your SYS with K into a new system. Do the root locus for the open-loop system. If you want to do the root locus fo...

14 years ago | 0

Answered
discrete plot
When you run numerical analysis in a digital computer, everything is discrete. If you zoom in enough in the scope, you will see ...

14 years ago | 0

Answered
S-function
<http://www.mathworks.com/help/toolbox/simulink/sfg/f6-633.html>. You can find more accurate information for your MATLAB/Simulin...

14 years ago | 1

Answered
Matlab&Excell
xlswrite() requires the Excel COM server. It might be either you don't have MS Excel installed, or you are using a non-PC comput...

14 years ago | 1

Answered
How do I get data to a GUI from excel file
Using the "handles.pushbutton4_Callback" for your Excel file name is really confusing. Also, it's better to specify the full pat...

14 years ago | 1

| accepted

Answered
How to display an array in uitable GUI when click "show table" button?
1. 'ColumnFormat' needs to be a cell array, so use h = uitable('Data', dat, 'ColumnFormat', {'numeric'}); 2. It looks ...

14 years ago | 1

| accepted

Answered
how to deal with a missing value of a time series?
It depends on your need. You could fill it with zero, or nan. Or you can fill it with values that are interpreted from known dat...

14 years ago | 0

Answered
declaring inputs in a function ?
help varargin, there is an example in the help document.

14 years ago | 1

| accepted

Answered
Time series data in excel
Okay, maybe this is what you need. 1. You may want to get rid of the duplicated time and its data. A=[1 0.1;1 0.2;2 0.3;...

14 years ago | 0

Answered
Matlab Matrix: Eliminating Duplicate Entries
unique(A,'rows')

14 years ago | 0

| accepted

Answered
Parser.
It depends. If the contents in the text file have a consistent format, many times using d=importdata('DataFile.txt') is sufficie...

14 years ago | 0

| accepted

Answered
Solving Matrix differential equations
dxdt and x should be n by 1 vectors. Yes. ode45 or other ode solver can solve the system at once. run odeexamples.m to see va...

14 years ago | 1

| accepted

Answered
How to transfer value of a array to another array?
Depending on the order you want, a(a==0)=b(:) or b=b.'; a(a==0)=b(:)

14 years ago | 0

| accepted

Answered
Using contourmatrix to create contour
From help contour [C,H] = CONTOUR(...) returns contour matrix C as described in CONTOURC and a handle H to a contourgrou...

14 years ago | 0

Answered
Placing Blocks of fixed size to random positions in a bigger matrix
%% a=rand(3); A=magic(10); [m,n]=size(a); [M,N]=size(A); i=floor((M-m)*rand)+1; j=floor((N-n)*rand)+...

14 years ago | 0

Load more