Question


Reordering variables in a table array
Let's say I have the table below. I want to reorder them by their ages. I tried to use TSort.Age = sort(TSort.Age) but it do...

6 years ago | 1 answer | 0

1

answer

Answered
Word Count in a PDF file
Hi Ahmed, you can use extractFileText. You must choose a starter word and a finisher word, this word must be unique. Because, co...

6 years ago | 0

| accepted

Answered
Index exceeds array bounds and some other mistakes
I believe you meant third for loop's second and third line. Because, in second for loop I don't think these types of errors woul...

6 years ago | 0

| accepted

Answered
Plotting one cycle of a wave
I believe axis() would work. I wrote an example code with a signal which has cycles. x = 1:100; signal = (1-cos(2*pi*0.01*x)...

6 years ago | 0

Answered
Multiplication of sound and sinusoidal signal
The problem here is you take the t2 until 1 second, when your sound lasts more (or less) than 1 second t2=0:1/Fs:1; However i...

6 years ago | 1

| accepted

Answered
How do I make this matlab code to plot multiple figures in subsequent 'while' iterations ?
You should write figure() for every if statement to display corresponding image. So, just write at the begining of the statement...

6 years ago | 0

| accepted

Answered
Reading Image/Audio Files of different types
Hi Pedro, you can find the supported types of both images and audios in the related pages of Matlab. Link: https://www.mathwor...

6 years ago | 1

Answered
Copy file from one directory to another
Maybe you can get parts of the filename by using [filepath,name,ext] = fileparts(file); and after that you can use directly ...

6 years ago | 0

Answered
How to calculate multiplying two matrices using (for) and (if) loops together ???
Hi hcourah, you can add try - catch to send the message for i=1:n for j=1:m try c(i,j)=A(i,:)*b(:,...

6 years ago | 0

Answered
How to simulate bit stuffing on a 20860×1 matrix of binary data?
Hi Rania, you may try this: a =randi([0 1],1,20860); a = num2str(a); a = strsplit(a); a = strcat(a); a = cell2mat(a); k...

6 years ago | 0

Answered
How can I merge many rows of different lengths into a matrix?
Hi Rupeng, as far as I understand you want to work with arrays. So you can use this code below A=[1:2]; B=[3:7]; C=[1:10]; ...

6 years ago | 0

Answered
Splitting column to different length columns in matrix
It is not possible in numerical array. However, you may do it with cell arrays by using mat2cell as Stephen mentioned in the com...

6 years ago | 0

Answered
I'm trying to make a Simpsons Rule Function Myself
Hi Jack, I fixed your code as much as I can. You can use the code below: function [y] =MPR_Asgn4_Q4a_26024405(f,a,b,n) ...

6 years ago | 0

| accepted

Answered
Add row and column headers to 3d matrix
Hi Kevin; You may try this: Z = zeros(165,168,59); rowheader = cellstr('rowheader'); columnHeader = cellstr('columnHeader');...

6 years ago | 0

Answered
How to do a summation of slides?
It is quite dubios what you are trying to say but if I understood a little correctly you may try temp = []; for i = 1:length(i...

6 years ago | 0

Question


I want to name variables while writing into matfile in a for loop
I have a loop over dates and all the value(mostly cell arrays) comes out from this loop is going to be saved into matfile. But I...

6 years ago | 1 answer | 0

1

answer