Réponse apportée
Matlab While Loop problem
count = 0 while count < numel(a) count = count + 1; if a(count)>1 b(count) = log(a(count)); else b(count) = ...

plus de 12 ans il y a | 0

Réponse apportée
Transform a two dimensional into a three dimensional and combine with another three dimensional array
Repmat is an efficient method... A = randn(4,3); for i = 5:-1:1 B(:,:,5) = A; end B(:,end+(1:10),:) = zeros(4...

plus de 12 ans il y a | 0

Réponse apportée
I tried debugging the code it works until it reaches line 31 (temp=pad...) i dont know what i am doing wrong but can u help me with this error it is indicated after the code
Put a breakpoint in your code at line 31, and look in the memory of the function for a _variable_ called pad. I suspect that you...

plus de 12 ans il y a | 0

Réponse apportée
Basics of Audio Communication??
Soundwaves are converted to electrical signals by a microphone. In basic AM transmission, those electrical signals are added...

plus de 12 ans il y a | 0

Réponse apportée
how to compare multiple plots of filter by different colors in a same window?
Generic answer: t = 0:timestep:time_end; % supply your own "time" values x1 = sin(t); % output of filter 1 x2 = cos(4*pi...

plus de 12 ans il y a | 0

Réponse apportée
I have been getting this error and have had no luck resolving it. Any help please?
_(It follows the END that terminates the definition of the function "addwaves3".)_ Thats your major clue: function ... ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Calculation of monthly returns
Your if statement condition looks hinky. "h+k<=j" is ALWAYS false, because you've coded h to ALWAYS be higher or equal to j ...

plus de 12 ans il y a | 0

Réponse apportée
"Work around" for using an index with decimal entries
Ok, looks like you have two "good" options. #1 Store the indices in an array of their own, of the same size as the data. ...

plus de 12 ans il y a | 0

Réponse apportée
Importating Data from Excell
third_col = xlsread(filename, sheet#, 'C:C')'; times = 0:5:((86000-1)*5); plot(times,third_col) The "n"th part of thir...

plus de 12 ans il y a | 0

Réponse apportée
peak addition/ arrary addition
If all the peaks have the same parameterised formula f = @(A,B,C,x)(A.*exp(-(1-x./B).^2./C); for i = 1:numel(x) y(i) ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Draw a binary image
image_i_want = [1 1 0 0 1 1 0 0 1 1 1 0 0 0 ...put in the rest of your pattern... ]; imagesc(image_i_want) You probably wa...

plus de 12 ans il y a | 1

Réponse apportée
Importing multiple csv files, giving them new names and extracting different columns of data to form seperate datastrings
Importdir=dir('*.CSV') for i = 1:numel(Importdir); M = Importdir(i).name; M =csvimport (M); M_D{i} = M(:,3); M_U{...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Any method to restore garbled/distorted text file?
read the file as binary data, unsigned 8 bit integers. When you have an unknown symbol, or for some reason you expect a know...

plus de 12 ans il y a | 0

Réponse apportée
How to open a specific EXCEL sheet with the function _fopen_?
fopen opens files for binary or string access. An excel file is a binary file in a format that is not easily defined, so rea...

plus de 12 ans il y a | 1

Réponse apportée
savesas does not work as saveas in the menu
Try using gcf with saveas, not gca.

plus de 12 ans il y a | 0

Réponse apportée
How to "save as" a processed graph as a .txt data file?
csvwrite can write text files (csv delimited), save can write text files if you use the ascii flag. uiputfile is a function ...

plus de 12 ans il y a | 0

Réponse apportée
Is it possible to create multiple functions and calling them in one .m file?
Generically, this is the process: function whee = whatevs(a,b,c) %1st line of m file whee = alpha(a) + beta(b) + gamma(c);...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
How to avoid overwriting in EXcel worksheet when program run next time?
Step 1: Check to see what has been written to the worksheet: [n t r] = xlsread(filename,sheetno); Step 2: Figure o...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to save to mat file
Looks like you're trying to save a file to either, an open file (try "fclose all"), or a file location that you do not have perm...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Calculate standard deviation given frequency counts rather than sample
mu = (A(:,1).*A(:,2)) ./ sum(A(:,1)); std =sqrt(sum(A(:,1).*(A(:,2)-mu).^2)) ./(sum(A(:,1))-1));

plus de 12 ans il y a | 0

Réponse apportée
How to open data file by browsing it - MATLAB GUI
If you use: cd(filepath1); You shouldn't need to use "filepath1" again. opener1=load([filename1]); %reads matlab...

plus de 12 ans il y a | 1

Réponse apportée
find an ID that has two values for another variable
x0 = find(ID = ID(i) & (fyear == year(x00-1) | fyear==year(x00-7))) Note that | is "pipe", not capital i, or lowercase L.

plus de 12 ans il y a | 0

| A accepté

Question


Invalid file properties returned by dir
So, I've been using dir to quickly get me a catalogue of all the file sizes of a specific type of file. My code works, however, ...

plus de 12 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
How to draw a perpendicular line to another?
xm0 = (x01+x02)/2; ym0 = (y01+y02)/2 m = (y2 - y1) / (x2-x1); PLm = tan( atan(m)+pi/2); PLc = ym0 - PLm*xm0; %PL line ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
find the nearest value
q = [1 3 6 8 10 15]; v = 9; [~,ans] = (min(abs(q - v)))

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
Two different ways to create a struct have 2 different results
I think it may be because structs are an alternative to cells and the chap who wrote the function thought it might make be sensi...

plus de 12 ans il y a | 0

Réponse apportée
Reading and loading variable file names
Sounds like you need a combination of reading filenames, and generating filenames: A = dir('D:\mydatahere\Wow*.mat'); A is...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
how can I calc velocity and acceleration in matlab?
Velocity = (Position2 - Position1) * sample_rate (or divide by the difference in times) Acceleration = (Velocity2-Velocity1) ...

plus de 12 ans il y a | 0

Réponse apportée
how to read a dat file in matlab
Try opening the file in notepad, or some other basic text editor and look at the data. If its garbled data, its obviously i...

plus de 12 ans il y a | 0

Réponse apportée
applying chaos to a signal using matlab/simulink
A pseudorandom sequence is a chaotic signal. rand - This gives you a pseudorandom number with a top-hat distribution of valu...

plus de 12 ans il y a | 2

Charger plus