Question


Accessing a specific char in a string
I am trying to access a specific char in a string. I get a number by the user and I need to index all the digits, because the...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Question


Using array as a for loop
I need to solve the polynomial x^4+nx^3-1 for n=-1,0,1 (without using for loop) What I did is: n=(-1:1:1); co_poly=[1...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


Check which field are the input from
Is there a way to check from which field the elements of the vector are? For example intger, rational numbers,etc. ?

presque 9 ans il y a | 1 réponse | 0

1

réponse

Question


Concatenating element- what the different?
What is the different between those code: NewVector=[Vector1,element,vector2]; and NewVector=[Vector1:element:vecto...

presque 9 ans il y a | 1 réponse | 0

1

réponse

Question


what does the following syntax
A=magic(3); B=A(:) disp(B) why does it show the matrix entires in a column vector? what does (:) mean?

presque 9 ans il y a | 1 réponse | 0

1

réponse

Question


loop inside Index of matrix
On the following code function [d] = matrix( n ) d=zeros(2*n-1); for i=1:n d(i:end-i+1,i:end-i)=i;...

presque 9 ans il y a | 1 réponse | 0

1

réponse

Question


incrementation in for loop
x = ones(1,10); for n = 2:6 x(n) = 2 * x(n - 1); end When written as above n increase by 1 after execution of ...

presque 9 ans il y a | 3 réponses | 0

3

réponses

Question


Calculating N-th Element Of A Sequence
function m = seq( x ) n=[(1:x);(1:x)]; if x==1 n(1,1)=2; end if x==2 n(1,2)=3; end n(1,x)=(1-s...

environ 9 ans il y a | 1 réponse | 0

1

réponse

Question


Saving to a vector
function [ b ] = PrimeF( x ) for i=1:x if mod(x,i)==0 b=i; end end b=isprime(b)*b; end ...

environ 9 ans il y a | 2 réponses | 0

2

réponses

Question


radians to degrees in pc client
Using the mobile app the following code rad2deg(pi) works, but not in the PC (attached image).

environ 9 ans il y a | 1 réponse | 0

0

réponse