Answered
how divise matrice by vector ...?
For the equation |mat*p=h| if the solution exist then Matlab will find it when you write p=mat/h It appears in your cas...

12 years ago | 0

Answered
Stop Ramp function before simulation time expires
Use a <http://www.mathworks.com/help/simulink/slref/saturation.html saturation block>

12 years ago | 1

| accepted

Answered
Calculation Error sum float
read <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

12 years ago | 1

Answered
Modeling for loop in simulink
Use <http://www.mathworks.com/help/simulink/slref/foreachsubsystem.html>

12 years ago | 0

Answered
I have n matrix and i want to put them in 1 matrix, you can say that i have sub arrays and want to put them in one
z=[x;y] look at <http://www.mathworks.com/help/matlab/math/creating-and-concatenating-matrices.html>

12 years ago | 0

Answered
Is there a way to suppress command outputs to command window?
fid1 = fopen('your_file.m'); fid2=fopen('new_file.m','w') res={}; while ~feof(fid) line1 =[fgetl(fid) ';']; res{end+1...

12 years ago | 1

Answered
count a vector with continuous non zero elements
x=[0 1 1 1 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1] ii=strfind([0 x 0],[0 1]) jj=strfind([0 x 0],[1 0]) out=jj-ii

12 years ago | 1

Answered
Comparing 2 column vectors?
a = [0,0,1] b = [0,1,0] out=mean(a~=b)

12 years ago | 0

| accepted

Answered
How to seperate a cell?
If you mean to create several variables, this is not a good idea, look at <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_var...

12 years ago | 0

Answered
how to prin only integer value in matlab ?
use round(93.5) Or floor(93.5) or ceil(93.5)

12 years ago | 1

Answered
issue when creating a long vector
like you mentioned it, it has to do with the ways that floating numbers are stored in memory. You can't do anything about that. ...

12 years ago | 0

Answered
Advices on functions to use, distribution and values extraction
I think you need to define some criterion that explain: *well approach all the 135 curves*,

12 years ago | 0

Answered
What does the two output matrix, L and U, mean in [L U] = factor(A, rho), where A is m-by-n matrix of real numbers?
f = factor(n) returns a row vector containing the prime factors of n, maybe in your case you are using another function created ...

12 years ago | 0

| accepted

Answered
name of variables from a cell of strings
b={'alpha', 'beta', 'gamma'} c=cellfun(@(x) ['x_' x],b,'un',0) Look at <http://matlab.wikia.com/wiki/FAQ#How_can_I_crea...

12 years ago | 0

Answered
Importing folder of .csv files and saving them as variables with different names.
d='E:\matlab' % your folder f=dir([d '\*.csv']) for k=1:numel(f) data{k}=xlsread(f{k}.name); end If you want the da...

12 years ago | 0

Answered
Counting the from when data changes to 0 then changes back to a number
a=[1 1 0 0 4 5 0 0 7 4 7 0 0 0 7] idx=[ 1 a~=0 1] ii=strfind(idx,[1 0]) jj=strfind(idx,[0 1]) out=jj-ii

12 years ago | 0

Answered
how to select the sample
z=[1;2;3;4;5;6;1;9;10;32;21] z(1:7) Read <http://www.mathworks.com/help/matlab/math/matrix-indexing.html>

12 years ago | 0

| accepted

Answered
Creating a matrix by some other matrices
[a 2*ones(size(a))]

12 years ago | 0

Answered
Trouble reading in multiple xls files
data1 is overwriten each loop, use for i=1:njump data1{i}=xlsread(sprintf('Trial%i.csv',i),sprintf('Trial%i',i),'A1:E7...

12 years ago | 0

| accepted

Answered
Match two vector and star the 2nd vector with zero value
A = [ 0.6 1 0.4 0 -0.4 -1 -0.4 0.2 0.6 1] idx=find(A==0,1) B=A; B(1:idx)=0

12 years ago | 1

| accepted

Answered
how draw this plot
x=[0 10 35 100] y=[25 25 80 80] plot(x,y)

12 years ago | 0

Answered
how to write more than one time in the same cell in cell array ?
A={1 2 3} A{1}(2)=4

12 years ago | 0

Answered
How to use surf ?
i=1:10 j=1:10 [ii,jj]=meshgrid(i,j) x=sin(ii) y=cos(jj) f=x.^2+y.^2 surf(x,y,f)

12 years ago | 0

Answered
how to rename a variable?
Don't use several variables. Read this link <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in...

12 years ago | 1

Answered
extract numbers from cell array
A = {'jdldi'; 'jdks5.4555h'; 'f67'} b=regexp(A,'\d+(\.)?(\d+)?','match') out=str2double([b{:}])

12 years ago | 6

| accepted

Answered
how to index output figures
k=2 f=sprintf('Pic_%d.jpg',k)

12 years ago | 0

Answered
Problem regarding to change conversion of cell2mat.
my_cell={[1,10],[1,2,10],[1,6,10]} my_mat=cell2mat(my_cell')

12 years ago | 0

Answered
Simulink doesn't let me connect blocks
You can't connect a signal to a signal, but you can connect a signal to a block. What do you want to do with these two signa...

12 years ago | 0

Answered
Is there a way in Simulink to automatically duplicate the same subsystem any number of times?
Put your subsystem in a library file, then use add_bloc to add your subsystem to your model

12 years ago | 0

Load more