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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 2

| aceptada

Pregunta


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

más de 10 años hace | 1 respuesta | 1

1

respuesta

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

más de 10 años hace | 2

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 2

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 1

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

más de 10 años hace | 1

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

más de 10 años hace | 5

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 2

| aceptada

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

más de 10 años hace | 2

| aceptada

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

más de 10 años hace | 1

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 15

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

| aceptada

Cargar más