Réponse apportée
Diary does not print backspace ('\b') properly - alternative/solution?
I suspect that it does save the backslash character correctly, but that the editor that you are using to open the diary doesn't ...

plus de 10 ans il y a | 0

Réponse apportée
Help with matlab, dimensions of matrices being concatenated are not consistent, why?
Seeing what you are trying to do in the call to plot, I suspect that you didn't want to solve a linear system when you defined |...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
urlread function: put variable in string
You can concatenate strings using square brackets, but I usually prefer building a final string using SPRINTF, e.g. url = sp...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
extracting specific part from txt file
It is difficult to understand what "for each .." means in your question. If you just need to extract the numbers that you specif...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
order a cell array by the dimension of its cells
Here is one way: Build test data: >> c = {randi(10,1,3), randi(10,1,4),randi(10,1,2),randi(10,1,3)}' c = [1x3 dou...

plus de 10 ans il y a | 2

| A accepté

Question


Is there a "signature" for objects instances of subclasses of handle?
Dear all, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assume that we have a class |MyClass<handle|. Is there a "kind of signature" th...

plus de 10 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Why is MyCellArray{:} different than x = MyCellArray{:}?
|MyCellArray{:}| is a Comma Separated List (CSL). It is the information that you are missing I guess. The |x| on the left hand s...

plus de 10 ans il y a | 2

Réponse apportée
Getting help for a function from another function
As mentioned in my comment above, you could write a small code manager tool which performs this kind of updates for you. I often...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Repeated printing of output when the code is run. How to change to print it only once?
This is because MEAN works along a dimension (the 1st by default) and not over the full array. See below: >> A = rand(3, 4) ...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
Assinging String Value to Structure
Here is one way: [unshuff(1,:).myfield] = deal( 'new practice' ) ;

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
how the function typecast works when convert double to uint8
Look at the difference between CAST and TYPECAST, and you will understand what happens in your example. PS: if you want to un...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Most efficient way of tackling this problem
Here is the beginning of an answer while I am waiting for my plane. "Most efficient" can have multiple meanings here. Does i...

plus de 10 ans il y a | 1

Réponse apportée
Creating discrete variables within a for loop
*UPDATED* Here is a fun (maybe) example: nShapes = 10 ; nFrames = 100 ; % - Build figure and axes. figure() ; s...

plus de 10 ans il y a | 1

Réponse apportée
Please im having this messeage displayed when using xlswrite function
This is a warning that informs you that you are operating on a spreadsheet that doesn't exist, and hence adding it to the workbo...

plus de 10 ans il y a | 5

| A accepté

Réponse apportée
Remove row in cell array depending on value of first column.
The easiest way is using a loop: for cId = 1 : numel( C ) isLt6 = C{cId}(:,1) < 6 ; C{cId} = C{cId}(~isLt6,:) ; ...

plus de 10 ans il y a | 0

Réponse apportée
How to use dir in a loop to be dynamic?
We actually use DIR the other way around. If file names are very regular and determined by e.g. a number, we built them using SP...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
Is there any way to identify the fingerprint contents in an image using matlab?
Here is a lightweight approach that is absolutely not solid/stable; .. could be a starting point? I = imread( 'fingerprint00...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
set legend to non transparent
What do you mean by opaque? By default the legend is boxed and opaque: >> t = 0 : 0.1 : 10 ; plot( t, sin(t), 'b', t, cos(t...

plus de 10 ans il y a | 1

Réponse apportée
Export matched lines from two text files
Here is a first draft. Test it and let me know if anything is unclear or doesn't work. % - Read files content as strings. ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
What is the best approach in editing script files with other script files ?
You can do something along the following line. As you don't have 4 columns in your Excel file, I assume that the former values c...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How to create subplots with little vertical spacing?
You can store/use the axis handles of both subplots and access/modify their properties. Here is an example: t = 0:0.1:10 ; ...

plus de 10 ans il y a | 15

Réponse apportée
How to import hex values from text file?
*EDIT:* I updated my answer with comments and made it a little more efficient. buf = fileread( 'chromebackground_0_150810-14...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Exporting matched lines from a text file
Because your file contains no new line characters (\n = ASCII 10) but only carriage return characters (\r = ASCII 13). After you...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to define new methods on existing matlab classes?
Generally speaking, you *cannot* do it. You cannot subclass MATLAB fundamental classes. You may want to try building your ow...

plus de 10 ans il y a | 0

Réponse apportée
Heat map of a 1999x1000 matrix of values, x and y positions given by separate 1999x1000 matrices?
The problem is that you don't have a regular grid. If you had one, you could remap elements of |x|, |y|, and |z| according to tw...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Character restriction in text file
If you want to keep only the lines which start with the character |M|, the following would work: content = fileread( 'BTM.tx...

plus de 10 ans il y a | 0

Réponse apportée
Search entire multi level cell array for matching string
If you have 2015a or above, this can be an occasion for playing with the new REPELEM function: linId = strcmpi( [MyCellArra...

plus de 10 ans il y a | 0

Réponse apportée
extract data from each row in a matrix if all columns in that row above a threshold
Here is an example: >> A = randi( 20, 10, 5 ) % Dummy example. A = 17 4 14 15 9 19 20 1 ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Multiplying the row numbers and column numbers, NOT THE ELEMENTS iN THEM
Assuming e.g.: nRows = 5 ; nCols = 8 ; you can do it this way: prods = bsxfun( @mtimes, (1:nRows)', 1:nCols ) ; ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Removing unwanted lines from text file
Not far! You made two small mistakes actually. The first is that you have 7 columns, and hence 6 separators, so the array of sep...

plus de 10 ans il y a | 0

| A accepté

Charger plus