Domanda


writing a label on every point in scatter plot
is it possibile to write a label text on/near a points in scatter points?

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


disable border blue in scatter plot
I'm building a scatter plot and I would that some points in the plot should be red. scatter(nodes(:,2),nodes(:,3),'filled')...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


how to debug matlab code
I'm a java programmer and I usually work with netbeans. It gave me the possibility to debug my code. During debbugging, after ha...

circa 12 anni fa | 1 risposta | 1

1

risposta

Domanda


apply a function to every element of a square matrix
I have a square matrix and I would apply a function to every element of that matrix in the way I get a new square matrix where e...

circa 12 anni fa | 3 risposte | 0

3

risposte

Domanda


building a matrix starting from another matrix
I want to build a square matrix. Let's suppose We have this matrix called nodes 1 4.3434 3.4565 2 6.2234 5.1234 3 1...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


indexing a square matrix in the best possible way
I have a square matrix and I would check some condition of every element of it.which could be the best way to indexing a square ...

circa 12 anni fa | 3 risposte | 0

3

risposte

Domanda


fill a vector inside a cycle
I have a script where I have to fill a vector like this example: heads = (1:10); vector_to_fill = zeros(1,5); for i...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


how preallocate structure for better memory
I had created a structure made so: head.number = 3; head.pck_rcv = [1 0 0]; heads(2).number = 5; head(2).pck_r...

circa 12 anni fa | 3 risposte | 2

3

risposte

Domanda


store values in a certain way
I would store values in a certain way like this: For example I have values as [2 3] to this values I would connect to 2 a vec...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


preallocate vector or not
I'm doing a simulation and I initialize a vector that will contain during the simulation integer values. At the beginning I don'...

circa 12 anni fa | 3 risposte | 0

3

risposte

Domanda


find index of a matrix through another matrix
I have this matrix A = [1 3 4 6 7] and B = [3 4] that it's a subset of A matrix. For example I would find the index of B matrix ...

circa 12 anni fa | 3 risposte | 0

3

risposte

Domanda


same values using randi setting seed as default
I'm using randi to generate rand integer valeus but I get the same values two times in my vector. example rng default; f...

circa 12 anni fa | 5 risposte | 0

5

risposte

Domanda


enter in the if clause only in certain situation
I would execute a block only if I have this vector A=[1 0] instead if I'd have A=[0 0] or A=[1 1] if clause shouldn't be...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


how to create while statement
I'd create while statement that should works like: A is an column vector while [every A element is not equals to 1] ...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


there is a way that if clause it is execute
Here it is a piece of code: x = rand; if x < 1E-6 do-something end if I execute this piece of block in l...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


find if a column vector contains at least element 1
I have to check if column vector has at least element 1. Does Matlab have such similar function or I have to build it myself?

circa 12 anni fa | 2 risposte | 0

2

risposte

Domanda


rand integer values from an array
I have an array that contains some integer. i.e A=[1 5 7 9] I would choose a rand value from this vector. Which cou...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


best way to enter only one time in a if block
I have a for cycle for n= 1: 100 x=rand()*10; if x > 5 do something end end When I exec...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


obtaining values major than 10e-7
I use rand function to generate values x = rand; after that I compared generated values to 10e-7 if x > 10e-7...

circa 12 anni fa | 1 risposta | 0

1

risposta

Domanda


Obtaining same values at avery simulation using rand function
I'm building some simulations with matlab and I use rand function. I would obtain at every run, the same results. I read somewhe...

circa 12 anni fa | 3 risposte | 0

3

risposte