Answered
how to write years in xtick.
<http://www.mathworks.com/matlabcentral/answers/103026-how-can-i-rotate-my-x-axis-tick-labels-and-place-an-x-label-on-my-plot>

12 years ago | 1

Answered
Transfer Function of a simple Circuit using Simulink
Do you want to simulate this circuit with Simulink? If yes , you will need a simscape toolbox

12 years ago | 0

Answered
find average of x and y values separatly of excel file in Matlab.
M=randi(10,4,6) x=M(:,1:2:end) y=M(:,2:2:end) average_x=mean(x(:)) average_y=mean(y(:))

12 years ago | 1

| accepted

Answered
Write a matrix to a text file with a space between columns
dlmwrite('yourfile',yourmatrix,'delimiter',' ')

12 years ago | 2

| accepted

Answered
undefined function or method 'ocr' for input arguments of type 'unit8'
Try ocrResults=ocr(double(im),roi);

12 years ago | 0

Answered
changing block parameter during simulation.
Use set_param to modify your block parameters. Use also set_param(modelName,'SimulationCommand','start'); % to start simu...

12 years ago | 0

| accepted

Answered
cell to double problem for loop includes cellarrays.
Replace x by x{k} inv(x{k}'*x{k})*x{k}'*y{k}

12 years ago | 0

| accepted

Answered
How to put more than one excel files into a single text document
Use xlsread to import your 7 files, then concatenate your data. You can use dlmwrite to write your final matrix to a text file

12 years ago | 0

Answered
How can I fill empty elements in a vector to preserve conjunction ?
Your vector should be something like this v={3;[] ;4;[];3;[];2;[];2;[];2} You can add this code for k=1:numel(v) ...

12 years ago | 0

| accepted

Answered
How to use special subplot
for i=[1:4 6:9] %Number of headings subplot(3,3,i) end

12 years ago | 0

| accepted

Answered
Why summing a matrix in 2 different ways can give not the same numbers ??? Does anyone know?
Because the summations are done in different order, look at this link <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_....

12 years ago | 0

| accepted

Answered
Open multiple files in different sub-folders with same starting file name
for k=1:39 f=sprintf('Home\\folder%d\\output_%d',k,k) % read f end

12 years ago | 0

Answered
Reading a large text file with 3652500 rows and 8 columns
data=importdata('sample.txt')

12 years ago | 0

Answered
How can I get different elements of a vector?
a = [3 5 5 9 5 3 9 5]; [ii,jj,kk]=unique(a); idx=accumarray(kk,1:numel(kk),[],@(x) {sort(x)'}); disp(ii) celldisp(idx)

12 years ago | 1

| accepted

Answered
how remove duplicate rows ?
C=A(~ismember(A,B,'rows'),:);

12 years ago | 0

Answered
How number character array to single number conversion can be performed?
Z_data ='-008.5710001' %Z_data is already a char type Z_data_num=str2num(Z_data) In your case by adding Z_data_str=...

12 years ago | 0

| accepted

Answered
series with empty entrys
a={1;2;3} a(end+1:end+2)={[]}

12 years ago | 0

Answered
Variable for a matrix
for k=1:39 eval(sprintf('St1_WW_avg(%d)=mean(Trans%dWW)',k,k)); end You shouldn't use all these variables, it's ...

12 years ago | 0

| accepted

Answered
Why this code won't run
This file is a function called STUPID. save as STUPID.m then call it IN WINDOWS COMMND STUPID

12 years ago | 0

Answered
How to pass in a list of variables to "load" function without using eval?
PS = load(filePets, sprintf('%s',petList{:}))

12 years ago | 0

Answered
Insert values for every after 4th cell in a row
z=nan(1,10000) Matrix2=rand(1,2499); % Example n=numel(Matrix2); z(1:4:4*n)=Matrix2

12 years ago | 0

| accepted

Answered
What's wrong with my code?
There is no error in your code, the problem is the way you are using it. Save the followed code as *pendulum.m* functi...

12 years ago | 0

| accepted

Answered
How apply more than one "if" to determine different changes in one "matrix"
for i=1:length(base) p=base(i) q=isfinite(p) if q<=24.2; data(i)=1.5393*p-13.2; elseif q>=24....

12 years ago | 0

Answered
How to Create a Plot with a years on x-Axis
Look at this example t=0:0.01:10; y=sin(t); plot(t,y) xl=get(gca,'xlim') xt=linspace(xl(1),xl(2),2013-2006+1); set(gca...

12 years ago | 0

Answered
Load a given list of files
f1='c:/data/X/fileA.mat'; f2='c:/data/Y/fileB.mat'; list={f1, f2}; data=load (list{1})

12 years ago | 0

Answered
??? Subscript indices must either be real positive integers or logicals.
In your code there are indices equal to 0. output_args(x,y) % with x starting at 0 will give you an error, you should st...

12 years ago | 0

Answered
Transpose with scalar logical argument?
s=true.' islogical(s) But I can't explain why |islogical(true.')| returns 0

12 years ago | 0

Answered
I need to store every iteration in curve using plot
In side the loop, just after |BestFitness = min(fitness)| ; add Y1(i)= BestFitness Then after the loop X1=1:NVAR...

12 years ago | 1

| accepted

Answered
how to allocate a matrix less than 1 to a variable?
a = [.2 , .3 , 2 , 5 , .7 , 8] b=a(a<=1)

12 years ago | 0

| accepted

Load more