Beantwortet
Extract variable in nested for loop that otherwise gets replaced
1.- the product HCPV(i)=p(i)*h(i) need not be in a for loop. If you define p and h same size, in MATLAB you simply...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
TRAINING must be a numeric matrix.
hi Hazel read the help for command *training* c = cvpartition(10,'kfold',3) c = K-fold cross validation partition...

mehr als 9 Jahre vor | 0

Beantwortet
how to find prime numbers by using mod function
Mohame primes_list=[] for k=1:1:200 L=mod(k,[1:200]); L2=find(L==0); if length(L2)<3 prime...

mehr als 9 Jahre vor | 2

Beantwortet
Determining which came first, Min or Max and then subtracting
do you mean this? data1=randi([-10 10],1,10) [max_data1 max_index]=max(data1);[min_data1 min_index]=min(data1); i...

mehr als 9 Jahre vor | 0

Beantwortet
Sum in a loop
Hi Miguel with no further information the following does what you ask for U=randi([-10 10],1,10) = 7.00 9.00 ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
For what kind of norm is this code?
Fred Following common norms 1. Euclidean norm: the length of a 1D vector, understanding by length the distance to t...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
Code for Plotting Sphere function
Atinesh, 4 steps 1. define the [x y] grid: x=[-10:1:10];y=[-10:1:10]; 2. build all possible points, there are othe...

mehr als 9 Jahre vor | 5

| akzeptiert

Beantwortet
How can I change multiple variable name within a loop, while assigning those variables as matrix values?
the initial extraction does not need a for loop: Cyc_n=dataMat(:,1); Cyc_p=dataMat(:,2); Cyc_v=dataMat(:,3); S...

mehr als 9 Jahre vor | 0

Beantwortet
Shifting number to end of an array
When you say 'to the end' of the array, what happens to the values shifted beyond the size of the array, do they show up at the ...

mehr als 9 Jahre vor | 0

Beantwortet
Where is the problem in this if-else structure?
because in your if cond1 elseif cond2 end cond1 and cond2 are nested, cond2 only happens if cond1 is f...

mehr als 9 Jahre vor | 0

Beantwortet
How do I find the closest points in a matrix
Hi Abdul please check if the following answers your question function void A=[1 2 4 5 100; 2 3 4 5 1; ...

mehr als 9 Jahre vor | 0

Beantwortet
convolution of two functions
Richard You don't really need the Symbolic toolbox. MATLAB already have classes to define standard and custom probability fu...

mehr als 9 Jahre vor | 9

Beantwortet
wavelet based contourlet transform
Nadia try the following 1. install this contourlet toolbox, by Minh Do and Martin Vetterli <http://uk.mathworks.com/...

mehr als 9 Jahre vor | 6

| akzeptiert

Beantwortet
String elements of a cell as a name to the array elements of another cell
Debjyoti Use the command evalin. evalin executes whatever you input, as long it's valid syntax. For instance, let's say...

mehr als 9 Jahre vor | 0

Beantwortet
How to convert 2D image of circle shape to 2D straight line ?
Ole the following script answers your question, attached script and the image of your question with name used in the script. ...

mehr als 9 Jahre vor | 3

| akzeptiert

Beantwortet
class and structure in matlab
a good start are the pages for commands class <http://uk.mathworks.com/help/matlab/ref/class.html?searchHighlight=class> ...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
How to plot the correct axes for a heatmap
Yeping the range in imshow( , ,[range]) does not change the axis ticking. For such purpose, to change the X axis ticks to ...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
How to correct the below code?
Satish change your last line from y=X*beta0*(eye(n))'+e; to diag(X*beta0)+e I assumed r=1 the comma...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Write a function called circle that takes a scalar input x. It needs to return an output called area that is a area of a circle with radius x and a second output of that is the circumference of the same circle. You are allowed to use the built in fun
Hi Prabhleen let me call the function f_circle, to avoid conflict with for example the already existing function circle in th...

mehr als 9 Jahre vor | 1

Beantwortet
How can I resample the acceleration signal?
Hi Bijay I passed your image through the OCR and obtained the attached text file data2.txt there may be a few differing numb...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Problem with optimization using fminunc
If you remove the 'LinesearchType' option, the error disappears, just a warning options=optimset('Display','notify','M...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
function arcsin in matlab
No, all input complex numbers seem to give complex angles, from the following the only way to get a real angle is to input a rea...

mehr als 9 Jahre vor | 1

Beantwortet
function arcsin in matlab
the answer to your question, how to calculate asin() for any input, and understand the output you need to know how to split the ...

mehr als 9 Jahre vor | 0

Beantwortet
How to solve equation with for loop? If it's not possible to, is there any alternative options?
Meilin you may want to solve for complex variable. Before solving, why not having a look how the function looks like: f...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
how to do zero padding for a vector?
Grupeet the padding you may have in mind is the actual interpolation of zeros blocks after each symbol. A=[1 2 3] ...

mehr als 9 Jahre vor | 42

Beantwortet
how do i implement y=nx(n-6) in matlab
Abhishek to 'shift' in time, linearly, it is, to delay or advance in time n, you don't multiply. To obtain the time base, ...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
S parameters calculating errors
Hi Xining I have just started using the Antenna Toolbox for MSc, but it looks like the standard dipole and monopole elements ...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to solve a system of equations in the matlab?
when det(A)=0, cond(A) is >>1 A=[0 1 -1 0;1 -1 0 0;-1 0 0 1;0 0 1 -1];b=[-40;160;-330;210] det(A) then instead of A...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
How to print figure generated by GUI?
try the following printdlg you should see an empty figure frame, and after that your system should show the printe...

mehr als 9 Jahre vor | 1

Beantwortet
Interp3 variables with monotonic increasing values
Let me split your data first, to avoid mixing different variables A=[0 0.1 -2 0.55 0 0.1 0 0.5 0 0.1 2 0.55 0 1 -2...

mehr als 9 Jahre vor | 0

| akzeptiert

Mehr laden