Beantwortet
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) = ...

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

Beantwortet
Basics of Audio Communication??
Soundwaves are converted to electrical signals by a microphone. In basic AM transmission, those electrical signals are added...

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

Beantwortet
"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. ...

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

Beantwortet
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) ...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

Beantwortet
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{...

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

Beantwortet
savesas does not work as saveas in the menu
Try using gcf with saveas, not gca.

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

Beantwortet
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);...

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

Beantwortet
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));

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

| akzeptiert

Frage


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

mehr als 12 Jahre vor | 1 Antwort | 0

1

Antwort

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 2

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 2

Mehr laden