Answered
Converting Matlab time vector into fractional year date
What do you mean by plotable ? There are many functions related to dates doc datenum doc datevec doc datestr

12 years ago | 0

Answered
selecting filenames from a dir list
A={'Template_001.asc' 'Template_001_spent_fuel_tank1.asc' 'Template_001_spent_fuel_tank2.asc' 'Template_001_payload.asc...

12 years ago | 0

| accepted

Answered
Finding the start and end indices of 3 or more repeating 0's.
A=[NaN NaN NaN NaN 0 0 0 NaN NaN 0 0 0 0 NaN NaN 0 0] ii=A==0 ii1=strfind([0 ii 0],[0,1]) ii2=strfind([0 ii 0],[1,0])-1 id...

12 years ago | 1

| accepted

Answered
How to quantise a sin wave with amplitude between -1 to 1?
ts=0.01 % sample time t=0:ts:10; % time vector y=sin(t); % your signal pas=(1-(-1))/(2^15-1) % quantization interval ye=...

12 years ago | 0

| accepted

Answered
Fast matrix multiplication in loop
a=rand(3,3); b=rand(100,3); n=size(a,2); m=size(b,1); c=zeros(m,n); for i=1:size(b,1) c(i,:)=a*b(i,:)'; end %or s...

12 years ago | 1

| accepted

Answered
how to find values in two different vectors ?
a=[2 7 9 10 17 22 24 28 29 32]; b=[74 79 82 85 88 91 92 95 96 97 98 99 102 108 121] m=[9;24;85;102] mt=find(ismember(a,m)) ...

12 years ago | 1

| accepted

Answered
Including comments in a .mat file?
You can get those information. Look at this example a=1; b=2; c=3; save filename a b c clear; load filename whos -fil...

12 years ago | 0

Answered
getting the error please help
Don't forget to use ./ instead of / b4=0.1:0.001:1; B=(20.*abs(b4))/3; F1=(6./abs(b4)).*(sqrt(10^(-2)+B)+10^(-1)); F2=(6...

12 years ago | 0

Answered
please help me sort this out
A=[4 44 55 66 23 33 22 27 21 44 66 34] B=[23 33 22 27] [~,ii]=max(sum(ismember(A,B),2))

12 years ago | 1

| accepted

Answered
modelling simulink block diagram
Try this approximation: (2s+6)/(0.0000001s+1)

12 years ago | 1

Answered
why can't I get a vector as an output while using a constant in the function handle ?
Because that's what your function do, the result is always 0, it's independent of your inputs

12 years ago | 0

Answered
Adding an Xlabel to a Semilogx plot?
Look at this example x=0:1000 y=sin(x) plot(x,y) set(gca,'xscale','log') Now add xlabel xlabel('you can do it')...

12 years ago | 0

Answered
Changing a string to a number
A={1 2 'N/A';3 'B' 5;'N/A' 0 0} %Example A(strcmp(A,'N/A'))={0}

12 years ago | 0

Answered
getting an entire row containing the max value in column n in a matrix
N=5 out=zeros(10,3); for k=1:10 A=rand(N,3); [~,idx]=max(A(:,2)); out(k,:)=A(idx,:); end

12 years ago | 0

| accepted

Answered
Converting a Log Scale Exponent Notation to Decimal Form
set(gca,'xticklabel',arrayfun(@(x) num2str(x),log10(get(gca,'xtick')),'un',0))

12 years ago | 1

Answered
How to display each individual word of a string
str='How to display each individual word of a string' out=regexp(str,' ','split')

12 years ago | 1

Answered
Question to Matlab solve-function
syms a t; sol=solve(a-t^2)

12 years ago | 0

| accepted

Answered
How to read data from m file and make it as input to simulink
Look at this answer <http://www.mathworks.com/matlabcentral/answers/114923#answer_123337>

12 years ago | 0

Answered
How to code this? Resampling of vector
t=[ 1 2.5 2.8 3 3.1 4 5 6 7 8 9 10 11 12]; s=[3 3.5 3.5 4 3 5.5 2 2.5 3 5 7 2.5 3.5 4 ] ii=hist(t,[2 6 10]) % 2 is the mid...

12 years ago | 0

Answered
Simulink From Workspace Block
You can use <http://www.mathworks.com/help/simulink/slref/fromfile.html from file block> or <http://www.mathworks.com/help/simu...

12 years ago | 1

Answered
Padding zeros to Existing Data
A=rand(86,14) % Example A(end+1:90,:)=0

12 years ago | 0

| accepted

Answered
help using sortrows please
Maybe you want a=[2 3 1;4 0 8; 7 3 9] sort(a,2)

12 years ago | 0

| accepted

Answered
Finding Consecutive True Values in a Vector
a=[0 0 0 1 0 1 0 0 1 1 1 1 0]' ii1=strfind([0 a' 0],[0 1]) ii2=strfind([0 a' 0],[1 0])-1 out=zeros(1,numel(a)); for k=1...

12 years ago | 1

Answered
how to deal with samples in simulink models
If x is an array with a fixed size, you can use a Demux block, you can also use a Matlab function block

12 years ago | 0

Answered
matlab text file processing
d=importdata('file.txt') num=d.data

12 years ago | 0

| accepted

Answered
simulink model for trasfer function
<http://www.mathworks.com/videos/getting-started-with-simulink-69027.html>

12 years ago | 0

Answered
comparing two tables or datasets
You can access your data then compare them dsA={1;2;3}; dsA=mat2dataset(dsA); dsB={1;2;3}; dsB=mat2dataset(dsB) %comp...

12 years ago | 0

Answered
problem using the find function
What you want is resault(resault>0.899 & resault < 1) Maybe what you mean by remove them resault(resault>0.899 & re...

12 years ago | 0

Answered
Question about summations from excel (backwards sum)
Your question is not clear, maybe you want A=[ 1 2 3 4] B=[10 20 30 40] out=cumsum(fliplr(A+B))

12 years ago | 0

Load more