Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 =...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Using strings as an argument of a function
Hi, The issue is with the input names. Change the input names with variable names other than MATLAB inbuilt functions, You can ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Creating [-1 1] matrix given length n
Hi Alice, You can try the following: len = 2; N = 2^len; bi = de2bi(N-1:-1:0); % Convert decimal numbers in to binary bi(b...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
"Unable to perform assignment because the left and right sides have a different number of elements"
Hi Ellen, The issue comes because for one of the equation, there are three roots, but till that iteration, only single root is ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
FTCS code shows Error using zeros
Hi Mingyi, The error you observe is due to the incorrect usage of zeros function. This can be solved with any of the following...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Compare two graphs on same plot
Hi Nathan, I assume both variables bhat and btilda have same length. % Option 1 figure plot(1:length(bhat),bhat,1:length(bti...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
while loop ends too early
Hi Ann, The loop runs as expected, since the floating values are represented in IEEE 754 format as described here. To know wha...

presque 6 ans il y a | 0

Réponse apportée
How to permute rows with specific number of permutation
Hi Sadiq, In the row shift, the function handle csm takes in first input as row and next input as image I, but while accessing ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How do I plot 'standing wave(modal) solution' ?
Hi Dilan, You made a good try. Here are some suggestions, as the plot indicate for a ratio of x/l, you could make only one of t...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Not a Number (NaN) values returned from a loop
Hi Thomas, Update Ti with a value other than 0 and then this would provide some values other than Nan. When Ti is 0, the value ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting results on log scale
Hi Omar, To plot the values in logarithmic scale, you can use loglog, semilogx, and semilogy plot functions. If you are not su...

presque 6 ans il y a | 0

Réponse apportée
Position of a value in matrix as (row,column)
Hi Diah, To get the value of a1_val from the SNR, you could try the following: % Option 1: Without any find and then accessing...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to edit MAT file in Mac?
Hi Yeji, You can't directly edit the mat files in MATLAB. Instead you can load the mat files, update the workspace variables an...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
LTE HDL MIB Recovery
Hi Pranjal, The Grid Memory block is right after the PBCH indexing block. There is an input coming from the grid memory block t...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Making a Matrix Strictly Diagonally-Dominant
HI Eligijus, The way the for loop is used here caused the issue. Update the second part of code as below and it works: functio...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Using this code in order to get a pig latin code that works for phrases as well
Hi Charlotte, You can perform this by entering the phase in the input and then splitting in to words, process and combining. He...

presque 6 ans il y a | 1

Réponse apportée
I have a code for K-means clustering help me correcting error
Hi Sandhiya, I think i know what the issue is. You have written the code for grayscale image and you might be trying to provide...

presque 6 ans il y a | 0

Réponse apportée
How do I properly plot Lagrange Interpolation ?
Hi Daniel, Update the variable xx with the limits of x rather than sum, and you would see a clear plot. Something like this x...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
sample rate change problem
Hi David, The resample function helps in this case. There are pretty good examples to provide some insights. Hope this helps. ...

presque 6 ans il y a | 1

Réponse apportée
Using delay seq to shift data with different delay conditions
Hi Zuha, Here is the code for what is looked for: a = rand(50,10); shift = [0 1 2 3 0 0 1 2 3 4]; % Use the shift required fo...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
word input codes in matlab
Hi Charlotte, Here is how you can perform this. Since you need to check if the first letter of the input word is vowel or not, ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
signalDatastore absent from Matlab 2019b
Hi Pablo, This feature is available in R2020a, (latest release of MATLAB). Once you install this version, you will be able to a...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
A*b=x that gives only one or no answer
Hi Bernadett, Minor things to figure out, the det function is only applicable to the square matrix. Here the input is a rectan...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Turbo Product Encoding MATLAB code
Hi Mohammed, To get started with the turbo product codes (TPC), go through TPC encoder and TPC decoder documentation. Use thos...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to apply function on columns while skipping certain columns
Hi Zuha, You can use a for loop as below and it does what is required, provided you expect the same amount of size in rows and ...

presque 6 ans il y a | 0

| A accepté

Charger plus