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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 2

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 2

| accettato

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

oltre 9 anni fa | 5

| accettato

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 9

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

oltre 9 anni fa | 6

| accettato

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 3

| accettato

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

oltre 9 anni fa | 2

| accettato

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

oltre 9 anni fa | 2

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 1

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 42

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 1

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

oltre 9 anni fa | 0

| accettato

Carica altro