A répondu
Export to a fixed width text file
Use sprintf / fprintf Here is an example of making everything 16 characters wide: A={'s09' 1111222003 321 'P' 'ehz';'z09...

presque 11 ans il y a | 0

| A accepté

A répondu
How to do this programming
You don't actually want 5 different variables. You want to reshape the variable and index into it. Example: X = 1:20; ...

presque 11 ans il y a | 0

| A accepté

A répondu
Question about optimizing reading data from text file
You may want to use fread and regexp. Without seeing your file, I can't say for sure this will produce the same result, but i...

presque 11 ans il y a | 0

A répondu
Reading/Finding data withing column
[~,ind] = ismember([1 1 0],constants(1:3,:),'rows'); constants(ind,4)

presque 11 ans il y a | 0

A répondu
How do I remove duplicates from a structure array?
It's not pretty, but this should work: isUnique = true(size(animals)); for ii = 1:length(animals)-1 for jj = ...

presque 11 ans il y a | 2

A répondu
How can I sort a matrix according to column IDs and identify same combinations?
*Accumarray* would come in handy here. It's a rather useful function, but might take a little bit of reading to understand it co...

presque 11 ans il y a | 0

| A accepté

A répondu
Most efficient way to generate combinations
You can use allcomb (which can be found <http://www.mathworks.com/matlabcentral/fileexchange/10064-allcomb here>) a = (1:20...

presque 11 ans il y a | 0

A répondu
Convert Cell to Number for Plotting
help str2double doc str2double

environ 11 ans il y a | 0

| A accepté

A répondu
Sorting the name field in dir command
[~,ind]=sort({xlsFiles.name}); W = xlsFiles(ind);

environ 11 ans il y a | 1

A répondu
Using conditional breakpoints to print out value
Yes sir. It takes a bit of creativity. Here's an example. Let's print out "Hi" each time mod(ii,2) == 0. iff(mod(ii,2),f...

environ 11 ans il y a | 1

| A accepté

A répondu
scaling a vector from 352800x1 to 300000x1 by cutting last 52800 row elements?
x = rand(352800,1); x(300001:end) = []; size(x)

environ 11 ans il y a | 0

| A accepté

A répondu
Speeding up code: pre-allocation, vectorization, parfor, spmd....
It's really hard to say what exactly you can do without knowing the nature of what is inside those for-loops. Some ideas come...

environ 11 ans il y a | 1

Question


Trimming the Size of a Array of Structures in a MEX file
Hi all. So i'm having a bit of an issue array of structures in a MEX file. I first initialize the array of structures to size...

environ 11 ans il y a | 1 réponse | 0

1

réponse

A répondu
what will be value of 'b' when 'a' is equal to 0(zero)
help interp1 doc interp1

plus de 11 ans il y a | 0

A répondu
Shaperead
That sounds like its in Universal Trans Mercator (UTM) coordinates. There are a few utm to geodetic coordinate transforms availi...

plus de 11 ans il y a | 0

A répondu
How to import a country map with counties and have Matlab recognize the various counties?
Assuming you have the mapping toolbox, you could just import it via a shape file. They can be found below: <ftp://ftp2.census...

plus de 11 ans il y a | 2

A répondu
logical indexing with a smaller array should throw a warning
This is an interesting proposition. While I'm very much against throwing an error in this case, I would be open to having a warn...

plus de 11 ans il y a | 0

A répondu
How to: Axis Xtick steps
xbounds = xlim; set(gca,'XTick',xbounds(1):xbounds(2));

plus de 11 ans il y a | 7

| A accepté

A répondu
Problems with xlsread function
I can't seem to recreate the problem. Try clearing and closing everything: values = {1, 2, 3 ; 4, 5, 'x' ; 7, 8, 9} head...

plus de 11 ans il y a | 0

A répondu
passing 'varagin' and getting inputname() to work properly
You could use "evalin" In your example it would be something like: function struct = temp( varargin ) struct = ...

plus de 11 ans il y a | 0

| A accepté

A répondu
How can I increase the size of data points in a discrete plot
Try the property MarkerSize. if true fig = open('myFig.fig'); hold on plot(xdata,ydata,'xg','MarkerSize',16); e...

plus de 11 ans il y a | 1

| A accepté

A répondu
A bug of build-in function Char?
This is where MATLAB differs from C. C will assume that 0 is the end of the string. MATLAB has explicit start and end points of ...

plus de 11 ans il y a | 1

| A accepté

A répondu
Using vertcat on multidimensional array data
x = rand(55,365,100); x_new = reshape(permute(x,[ 1 3 2 ]),5500,[]);

plus de 11 ans il y a | 3

| A accepté

A répondu
What is the code?
skewness is simple 2 divided by the square root of the shape parameter for gamma distributions. Here's an example. skewness...

plus de 11 ans il y a | 0

A répondu
how to detect folder address
You might consider mfilename pathh = fileparts(mfilename('fullpath')) help mfilename doc mfilename

plus de 11 ans il y a | 0

A répondu
I'm trying to find if certain points are inside or outside a polygon
help inpolygon doc inpolygon

plus de 11 ans il y a | 2

A répondu
How do I convert or save data from excel as asc file in order to analyse it using MATLAB.
You might not have to convert it to an ascii file. help xlsread doc xlsread

plus de 11 ans il y a | 0

A répondu
View images in between loops
drawnow;

plus de 11 ans il y a | 0

| A accepté

A répondu
Which is the fastest way to display gray scale images (480 by 640) ?
Try using drawnow instead of pause(x)

plus de 11 ans il y a | 0

A répondu
Using 'single' arrays with the "filter" command
Make sure all your inputs to filter are singles. Here's an example for a simple moving average: x = rand(100,1,'single')...

plus de 11 ans il y a | 0

Charger plus