Answered
How to Generate 12 random values and use the fft command in Matlab to find its 12-point DFT
Hi Riya, You can generate random values with rand function and perform DFT with fft function. Simply, x = rand(12,1); y = f...

4 years ago | 1

Answered
Network Analysis and Visualization
Hi Tugce, As a starting point, you can look over the FIle exchange submissions pmfg and PMFG, by Tomaso. You can contact the au...

4 years ago | 0

Answered
BER is showing zero
Hi Ruhin, You get zero BER due to very high SNR in the range of 65 to 68 dB. Try to modify the IdB to a very low value, to red...

4 years ago | 1

Answered
zero padding between data
Hi Fima, You can perform this task in many ways, one simple way is this: % Assign a variable with zeros for the length of the ...

4 years ago | 0

| accepted

Answered
trplot function doesn't show one of the axis
Hi Hassan, The function rotx and roty takes the input angle in degrees. The examples and description on these pages will provi...

4 years ago | 0

Answered
Please Explain this code
Hi Caitlin, Here is the annotated code with the explanation: clc; % Clear command window clear all; % Clears all the va...

4 years ago | 0

Answered
How to Subplot in a for loop
Hi Patrick, You can the following modifications to the code: 1) To plot it inline the for loops, you can use the count tempora...

4 years ago | 0

| accepted

Answered
Simple rearrangement of matrix
Hi Jens, Small modification to what you have done would work, this doesn't require a for loop A = [1,2,3]'; B = [A A]; B = r...

4 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
Hi Samuel, In the calculation of m in the for loop, trig value is not multiplied instead accessed with a value. This is the sou...

4 years ago | 0

| accepted

Answered
how to plot vector fields in matlab ??
Hi Pabba, You can look over the script provided here, which gives insights of how this can be done. The other usable function ...

4 years ago | 0

Answered
Taking An Average of Multiple Outputs From For Loop
Hi Celeste, You can take the mean of every reuterned M value, if you store the calculate M value in an array. The code overwrit...

4 years ago | 0

| accepted

Answered
How do i concatanate this two matrices even if they are not consistent .
Hi Bita, In general, inorder to concatenate two matrices any of the dimension must be the same. Like if number of rows are sa...

4 years ago | 0

| accepted

Answered
Repeating loop until input conditions are met
Hi, One small change that can be done is to place a while loop for the a1 input and then if a1 < 180, break the loop. Prototyp...

4 years ago | 0

| accepted

Answered
Error in if condition
Hi Ararat, Based on the information provided, the following will help if any(isnan(enthleft), 'all') && any(isnan(enthright), ...

4 years ago | 1

Answered
Ble and blelist functions cannot be found
Hi Natalija, The functions ble and blelist functions comes with support for Bluetooth Low Energy Communication with MATLAB from...

4 years ago | 2

Answered
Making Encoder for cyclic code
Hi Satrajeet, You might be looking for the binary encoder block and it is part of Communications Toolbox. Here is the link for ...

4 years ago | 0

Answered
Error while compressing the image using dct2()
Hi Anuja, This error can be solved by perfoming the RGB to gray conversion using rgb2gray function. To know the usage of dct2 w...

4 years ago | 0

| accepted

Answered
How to graph using a for loop
Hi Jose, This code need not require a for loop. The following can be done to get the same result: clc f=196.2; fi=0;...

4 years ago | 1

Answered
Invalid use of Operator error
Hi Pranav, Direct copy paste may not place it exactly as how is it written in the book. You could try to make slight modificati...

4 years ago | 0

| accepted

Answered
How to sum my matrix element?
Hi Eddy, It is because in one of the for loop, you made sum as a variable too. Using the same variable which is the same as inb...

4 years ago | 0

| accepted

Answered
How to edit matrice to another matrice?
Hi Ahdia, To perform just what you have asked for, you can do something as below: a = 10; b = 20; c = 30; d = 40; e = 50; ...

4 years ago | 1

| accepted

Answered
How to combine arrays
Hi, The following should help you do it: D = zeros(size(A)); D(A==1 | B == 1 | C == 1) = 1; Hope this helps. Regards, Srir...

4 years ago | 0

| accepted

Answered
can I download R2018a as a trial?
Hi Emily, You can download the free trial of any MATLAB version from here. To see the compatibility issues with R2018a updates...

4 years ago | 0

Answered
How to calculate IIR coefficient from filterDesigner
Hi Thanah, To export the filiter coefficients, you can try the following as suggested here https://www.mathworks.com/help/signa...

4 years ago | 0

Answered
using end in array
Hi Na, Minor update to your code, will give what you are looking for B=[]; A = {[1,2,3,15],[14,15,45,44,38,48,47,46]}; for i...

4 years ago | 0

| accepted

Answered
modify and repalce structure fields
Hi Jeff, You can try indexing as such >> ALL.E.A % ALL is a structure with field E and field E has another field A % To repla...

4 years ago | 0

Answered
From where do I insert the transpose operator for matrix operation ?
Hi Shubham, You can directly use (') operator % For example x = rand(3,5); xTranspose = x'; % size will be 5 x 3 % OR thr...

4 years ago | 1

Answered
Problem with matrices operations
Hi, You can try the following: x = rand(4,900); y = rand(4,900); sumOut = zeros(4,4); % Updated variable name to make it d...

4 years ago | 0

| accepted

Answered
Classification result of matrix row multiplication
Hi Alice, Provided you have a matrix as defined for length N. Here is the code that would work for length equal to 2. matrix =...

4 years ago | 0

| accepted

Answered
Damped Cosine wave not working
Hi Nicholas, The usage of function handle is wrong here. If you want it to be a function handle, you need to pass input to y. B...

4 years ago | 0

| accepted

Load more