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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 2

| akzeptiert

Frage


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

fast 11 Jahre vor | 1 Antwort | 1

1

Antwort

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

fast 11 Jahre vor | 2

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 2

| akzeptiert

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 5

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 2

| akzeptiert

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

fast 11 Jahre vor | 2

| akzeptiert

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 15

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 0

| akzeptiert

Mehr laden