Answered
Combining two binary words?
y=[a b]

13 years ago | 1

| accepted

Answered
How to load all variables from *.mat except one?
Use load(['restart_safety_' num2str(X)], '-regexp', '^(?!delta_t)\w');

13 years ago | 4

| accepted

Answered
Is there a way to convert an frd to a transfer function or to zeros and poles?
If you mean, finding a continuous system from discrete system, you can use a d2c function doc d2c

13 years ago | 0

Answered
In a logical array find how the density of TRUE values increases
%or maybe t=[1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 ]; s=num2str(t) s1=strrep(s,' ',...

13 years ago | 0

Answered
In a logical array find how the density of TRUE values increases
What you did in your previous comment is sort(t) I do not think this is what you want. Can you explain mathematically wh...

13 years ago | 0

Answered
Exporting data to excel sheet
You can use xlswrite function

13 years ago | 0

| accepted

Answered
How can I import a file that contains text and numerical values?
fid=fopen('fic.txt') out=textscan(fid,'%f %f %f %f %s %s %s %f %f %s') fclose(fid)

13 years ago | 0

Answered
Finding minimum and maximum in many txt samples.
I do not think, there is a better way to do it without a for loop

13 years ago | 0

Answered
Getting average of a single row of data
Seg1=struct('P_wave',num2cell(rand(1,747))); % Example a=[Seg1.P_wave] b={a(1:113);a(114:238);a(239:362);a(363:491);a(492:61...

13 years ago | 0

Answered
How can I solve this complex 4 equation with 4 unknowns
equ1='269.0-R1*(R2+R3+R4)/(R1+R2+R3+R4)' equ2='267.8-R2*(R1+R3+R4)/(R1+R2+R3+R4)' equ3='265.8- R3*(R1+R2+R4)/(R1+R2+R3+R4)' ...

13 years ago | 0

| accepted

Answered
looking for specific data in a text file
fid = fopen('yourfilename.txt'); line1 = fgetl(fid); res={line1}; while ischar(line1) line1 = fgetl(fid); res{end+1} ...

13 years ago | 0

Answered
How can I give input to function?
You should introduce the below constants nx= hx= nt= ht= init= lowb hub= k= Then type output=heat(nx,hx,nt...

13 years ago | 0

| accepted

Answered
compare columns & Display output using excel sheet
A=[ 1 1 10 1 2 20 1 3 30 1 4 40 1 5 50 2 1 60 2 2 70 2 3 80 2 4 90 2 5 100 3 1 110 3 2 120 3 3 130 3 4 140] ...

13 years ago | 1

| accepted

Answered
Setting plot limits with dates
Look at this example close x1=datenum('31-Oct-2012') x2=datenum('26-April-2013') x=x1:x2 y=sin(0.1*x) plot(x,y) xlim...

13 years ago | 3

Answered
Separating vectors into individual subsets for plotting
Using a for loop is faster if ~isnan(a(end)) a(end+1)=nan; end idx2=find(isnan(a)); idx1=[1 idx2(1:end-1)+1]; n=nu...

13 years ago | 0

| accepted

Answered
displaying values in command window
for i = 1:length(Mb) M_excess = Ma - Mb(i); v=[]; if abs(M_excess)<eps Hplus = Ka * ((Ma_final * 0.999...

13 years ago | 0

| accepted

Answered
Counting occurrences of a pointer
u = [3 4 1 1 5] accumarray(u',[1:numel(u)]',[],@(x) numel(x))

13 years ago | 0

| accepted

Answered
Separating vectors into individual subsets for plotting
a=[10 20 30 NaN 30 20 10 NaN 10 20 30] a(isnan(a))=[] out=reshape(a,3,[])

13 years ago | 0

Answered
Symbolic substitution (subs) doesn't work with negative expressions
Use disp( subs(a + 2*b, {-2*b,2*b}, {-c c}) )

13 years ago | 0

Answered
loops for if, ifelse, end
if M_excess > 0 Ma_final = (M_excess * 1000) ./ (Va + Vb(i)); Mb_final = (Mb(i) * 1000) ./ (Va + Vb(i)); Hplus ...

13 years ago | 0

| accepted

Answered
save as ascii files
fid = fopen('gc_test.txt', 'wt'); fprintf(fid, '%4.4f\n', [Vb;pH]); fclose(fid); If you want two columns Vb=[1;2;3]...

13 years ago | 0

| accepted

Answered
How can I extract data from XY Graph in Simulink?
Your XY graph has two input, just use a to workspace block to get your two signal x and y

13 years ago | 1

Answered
running it an error occurs as follows:??? Subscript indices must either be real positive integers or logicals. Error in ==> hanningwindow at 15 y(f)=20*log(abs(b));
The error is in this line y(f)=20*log(abs(b)); It should be y=20*log(abs(b)); Also avoid using clear all, use ju...

13 years ago | 0

| accepted

Answered
How to delay next output?
You can use Two blocks: a <http://www.mathworks.com/help/simulink/slref/switch.html switch block> to make a test and the <http:...

13 years ago | 0

Answered
How to solve the error messege in matlab?
In Matlab windows command type size(vd) You will see that the length of vd is >1 How can you compare |[1 2]| with 2 f...

13 years ago | 0

Answered
problem when i starting simulink
That means, you should change the step time of your solver from variable step to fixed step (in configuration parameters)

13 years ago | 1

Answered
xlswrite - define position where to write data
You can read the column in your excell file, then merge it with a new data, and save the result in your excell file.

13 years ago | 0

Answered
Matching two matrices by sign
sign(B(2,3))==sign(A(2,3)) For the whole matrices A=[1,1,-3;2,-1,4]; B=[2,4,-2; 2,-1,-3]; [ii,jj]=find(sign(A)==si...

13 years ago | 0

| accepted

Answered
Average for each value from a set of matrices
a=[1 2 3]; b=[4 5 6]; c=[7 8 9] d=[mean(a) mean(b) mean(c)] If it's not what you are looking for, give an example

13 years ago | 0

Load more