回答済み
Bit stream in to digits
Raza, you can retrieve the bit pattern by concatenating the cell strings: [r, c] = size(b); bit_stream = []; for ii =...

12年以上 前 | 0

| 採用済み

回答済み
Input argument "s" is undefined ,what does this mean?
Neel, did you call the function with proper input arguments, such as >> rec = interpolation([1;2],3,1) % I am just making ...

12年以上 前 | 0

回答済み
How to 'extract" a matrix named the same way as a string in a matrix?
Aroldo, is this what you are looking for? E0 = [1 2]; L = {'R1' 'E0'}; v = genvarname(L{2}); % change from L{2} to ...

12年以上 前 | 0

| 採用済み

回答済み
auto format x axis
Jason, this should do: t = 0:4700; y = rand(1,length(t)); % your data t_lim = 1e3*ceil(t(end)/1e...

12年以上 前 | 0

| 採用済み

回答済み
What is the reason for color of lines are repeating?
Venkatesan, could be that there is a hold on command, somewhere in the code? If so, replace by hold all to get d...

12年以上 前 | 0

回答済み
How to integrate 6 different variables into a struct?
Metin, you could simply use a cell array. As an example: New_form = {A D; B E; C F}; In this case |D| is accessed as ...

12年以上 前 | 1

| 採用済み

回答済み
Inserting a circle at specific coordinates
Rasmus, for the general case (circle with noise) check out <http://www.mathworks.com/matlabcentral/fileexchange/5557-circle-fit ...

12年以上 前 | 0

| 採用済み

回答済み
append one graph to another
You mean something along the lines of: x1 = 1:50; x2 = 1:10; x3 = 1:10; y1 = rand(1,50); y2 = rand(1,10); y3...

12年以上 前 | 0

回答済み
Writing Code For a Function
Shreef, replace prog::wait(3.0) % unless you are using MuPAD (symbolic) by pause(3) What are you trying to do ...

12年以上 前 | 0

回答済み
Is my bode plot inaccurate?
Quid, the Bode plot is correct. To compute the magnitude of the |P| you need to replace (substitute) the complex frequency |s| b...

12年以上 前 | 1

| 採用済み

回答済み
plot different colors in one trace concerning to the values
Hello Tim, would this do? x = linspace(1,2000,2000); y = sin(x/100); xx = {x(x<501) x(x>=501 & x<550) x(x>=550)}; ...

12年以上 前 | 0

回答済み
3*3 matrix in loop - calculation give NaN, why ?
This can happen for a range of reasons. In your case I would suspect that some of the values in |relor| are zero. Dividing zero ...

12年以上 前 | 0

回答済み
covert matlab program to simulink block
Shiksha, yes, provided I correctly understand your question. You can include MATLAB functions in Simulink models (e.g., by us...

12年以上 前 | 1

回答済み
Can I get outputs numbered each time it goes through a loop?
Ry, you could add disp(['Loop iteration: ', num2str(k)]); just before the |end| of the loop. It displays some text and th...

12年以上 前 | 0

回答済み
User definition of cell contents
Tom, you could use a <http://www.mathworks.com/help/matlab/matlab_prog/create-a-structure-array.html structure array>. As an exa...

12年以上 前 | 0

| 採用済み

回答済み
making blocks using for loop
Raza, this should do the trick: s = '101010001110100101010010010001010' s0 = '000000000'; b = {}; for ii = 1:...

12年以上 前 | 0

| 採用済み

回答済み
Help definitely needed! How do I load multiple txt files and change the varible names of each to include the date from file
Masao, assuming that the only the year changes in each filename, use for ii = 1973:2013 f_name = strcat('midas_wind_',...

12年以上 前 | 0

| 採用済み

回答済み
pass matlab variables to text file
Gerrit, I believe you already got most of what you need: my_var = 3; fid = fopen('test.htm','a'); fprintf(fid, ['<H2>...

12年以上 前 | 0

| 採用済み

回答済み
Error using textscan Invalid file identifier. Use fopen to generate a valid file identifier
Laura, use fnm = 'D02e1.txt'; fid = fopen(fnm,'r'); The filename needs to be a string of characters.

12年以上 前 | 0

回答済み
Finding which curve is which.
Roshan, use a |legend|, which gives you the information right in the plot. As an example: x = 0:0.1:pi; lab = []; hold...

12年以上 前 | 0

回答済み
PROBLEM WITH SAVING EXCEL FILE ?
Shanky, use <http://www.mathworks.com/help/matlab/ref/strcat.html |strcat|> instead filename = strcat(num2str(sNumber),'_Exc...

12年以上 前 | 0

回答済み
Undefined function (missing) 'tile'
Bobby, in this case |tile| is a variable that needs to be initialized before it can be used. The input parameter for the |gunzip...

12年以上 前 | 0

回答済み
Subscript indices must either be real positive integers or logicals.while using indexing
Use |clear all| and then copy-paste-execute a = [2 5 9]; b = [0 0 0 0 0 0 0 0 0 0]; b(a) = 1 Does that do the trick?

12年以上 前 | 1

| 採用済み

回答済み
To plot the model error against time
Priya, the "correct" syntax for subplots is: subplot(2,1,1) % notice the commas Other than that, what is size(delta...

12年以上 前 | 0

| 採用済み

回答済み
How to assign value in an array depending on the index stated in another array
Use b(a) = 1

12年以上 前 | 1

| 採用済み

回答済み
How can I plot lines with varying opacities/colors at each point?
Will, check out this <http://www.mathworks.de/matlabcentral/answers/5042-how-do-i-vary-color-along-a-2d-line#answer_7057 answer>...

12年以上 前 | 0

| 採用済み

回答済み
Removing characters from/breaking up file names
B.M. you could use the <http://www.mathworks.com/help/matlab/ref/strfind.html |strfind|> command: str = '02-Feb-2009_1.xls';...

12年以上 前 | 0

| 採用済み

回答済み
Matrix Calculation in MATLAB
Tanya, use symbolic math: syms x A = (2-x)*(3-x) A = (x - 2)*(x - 3) or, to solve your problem A = (2-x)*(3-x) -...

12年以上 前 | 0

回答済み
Slope of a line
In general, your equation is correct, |k = dY/dX|, however, in X = (max([50 50])-min([50 50])); % 50 - 50 = 0 Y =...

12年以上 前 | 1

| 採用済み

回答済み
Block and un-block items
Each object in a GUI has a unique name which you can use to set parameters for. As an example, for a pushbutton you would use: ...

12年以上 前 | 1

| 採用済み

さらに読み込む