Réponse apportée
Reading a text file
I recommend Jan's approach because it puts string into sting and numerical to numerical. But if you want it, you can use reshape...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
writing a code involving struct
For fun, just take all the text from TMW website and sort them according to the first letter and then put them into a word bank....

presque 15 ans il y a | 0

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

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
writing 1*5 char in one cell in excel
xlswrite('test.xls',cellstr(patients))

presque 15 ans il y a | 5

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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=...

presque 15 ans il y a | 1

Réponse apportée
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

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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'); ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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 ...

presque 15 ans il y a | 0

Réponse apportée
Saving the plotted data into a new image
saveas() or print()

presque 15 ans il y a | 0

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

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 15 ans il y a | 0

Réponse apportée
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...

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
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 ...

presque 15 ans il y a | 0

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

presque 15 ans il y a | 1

Réponse apportée
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...

presque 15 ans il y a | 1

Réponse apportée
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...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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 ...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 0

Réponse apportée
declaring inputs in a function ?
help varargin, there is an example in the help document.

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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;...

presque 15 ans il y a | 0

Réponse apportée
Matlab Matrix: Eliminating Duplicate Entries
unique(A,'rows')

presque 15 ans il y a | 0

| A accepté

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

presque 15 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 15 ans il y a | 1

| A accepté

Réponse apportée
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(:)

presque 15 ans il y a | 0

| A accepté

Charger plus