Risposto
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 ...

oltre 10 anni fa | 0

Risposto
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 |...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 1

| accettato

Risposto
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...

oltre 10 anni fa | 1

| accettato

Risposto
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...

oltre 10 anni fa | 2

| accettato

Domanda


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...

oltre 10 anni fa | 1 risposta | 1

1

risposta

Risposto
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...

oltre 10 anni fa | 2

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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) ...

oltre 10 anni fa | 2

| accettato

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

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 1

| accettato

Risposto
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...

oltre 10 anni fa | 1

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

oltre 10 anni fa | 1

Risposto
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...

oltre 10 anni fa | 5

| accettato

Risposto
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,:) ; ...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 2

| accettato

Risposto
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...

oltre 10 anni fa | 2

| accettato

Risposto
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...

oltre 10 anni fa | 1

Risposto
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. ...

oltre 10 anni fa | 1

| accettato

Risposto
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...

oltre 10 anni fa | 1

| accettato

Risposto
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 ; ...

oltre 10 anni fa | 15

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

| accettato

Risposto
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...

oltre 10 anni fa | 0

Risposto
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...

oltre 10 anni fa | 0

Risposto
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 ...

oltre 10 anni fa | 1

| accettato

Risposto
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 ) ; ...

oltre 10 anni fa | 1

| accettato

Risposto
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...

oltre 10 anni fa | 0

| accettato

Carica altro