답변 있음
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) = ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

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

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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 ... ...

12년 초과 전 | 0

| 수락됨

답변 있음
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 ...

12년 초과 전 | 0

답변 있음
"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. ...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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) ...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 1

답변 있음
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{...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

답변 있음
savesas does not work as saveas in the menu
Try using gcf with saveas, not gca.

12년 초과 전 | 0

답변 있음
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 ...

12년 초과 전 | 0

답변 있음
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);...

12년 초과 전 | 1

| 수락됨

답변 있음
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...

12년 초과 전 | 0

| 수락됨

답변 있음
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...

12년 초과 전 | 1

| 수락됨

답변 있음
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));

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 1

답변 있음
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.

12년 초과 전 | 0

| 수락됨

질문


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

12년 초과 전 | 답변 수: 1 | 0

1

답변

답변 있음
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 ...

12년 초과 전 | 0

| 수락됨

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

12년 초과 전 | 2

| 수락됨

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

| 수락됨

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

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 0

답변 있음
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...

12년 초과 전 | 2

더 보기