Answered
Function to write data to a specifc line in a text file
<http://www.mathworks.com/help/matlab/ref/fprintf.html>

9 years ago | 0

Answered
Break a big matrix into cell array based on repetitive number in one of the matrix columns
%------Example--------------- A(1:1000,[1 3])=randi(100,1000,2) A(:,2)=randi(3,1000,1) %-----The code----------------- [ii...

9 years ago | 1

Answered
how to obain each pixel value of a gray scale image of size 256*256
if M is your image, x=10,y=20 % x and y are the coordinates of the desired pixels M(x,y) impixel allows you to get in...

9 years ago | 0

Answered
If statement with table
C is not a <http://www.mathworks.com/help/matlab/tables.html table> it's a cell array C = {'bgin' 'NAN'; 'resp' '';'TRSP' ...

9 years ago | 0

| accepted

Answered
I am just passout engineer and
<http://www.mathworks.com/help/matlab/getting-started-with-matlab.html>

9 years ago | 0

Answered
Diagonal of a multiplication between matrix without doing the actual multiplication or using a loop
%------Example------------- A=randi(10,3) B=randi(10,3) %-----------The code---------- C=reshape(A,[],1,3) D=reshape(B,[]...

9 years ago | 0

Answered
How to plot multiple lines in a 3d graph?
plot(M') %Example M=randi(10,4,20) plot(M')

9 years ago | 0

Answered
How do I convert this C code into a Simulink model?
You can use a <http://www.mathworks.com/help/simulink/slref/memory.html memory bloc> or a <http://www.mathworks.com/help/simulin...

9 years ago | 0

| accepted

Answered
How Can i create 3*3 matrix from 1*3 matrix?
[b;zeros(2,numel(b))]

9 years ago | 1

| accepted

Answered
how to apply for loop for different vectors
Use cell arrays clear V={[1 2 3 4],[6 7 7 8 2 1 3 2]} number_of_vectors=numel(V); for ii=1:number_of_vectors M=V{ii...

9 years ago | 0

| accepted

Answered
What is the error in my state space model?
The matrices A,B,C,D of your SS model should be set inside your SS block <http://www.mathworks.com/help/simulink/slref/statespac...

9 years ago | 0

| accepted

Answered
How to plot inequalities in three dimesnions?
Your inequalities have an infinity of solutions that you can't plot

9 years ago | 0

Answered
determination between Inf and -Inf
a=[1 2 inf 3 -inf -4] idx=isinf(a) sign(a(idx))

9 years ago | 0

| accepted

Answered
How can I find inverse laplace transform of functions?
<http://www.mathworks.com/help/symbolic/ilaplace.html>

9 years ago | 0

Answered
how to handle undefined operations on elements of a matrix
sigDenom = sigma*sqrt(t); idx=sigDenom~=0 d1(idx) = (log(S(idx)./K(idx) + (r(idx)+sigma(idx)*sigma(idx)/2).*t(idx))./(si...

9 years ago | 0

| accepted

Answered
How to get all the parameters of Mask ?
For the Constant block for example: get_param('untitled/Constant','DialogParameters')

9 years ago | 0

| accepted

Answered
What does this commands mean?
If you mean the fprintf function, you can find the documentation here: <http://www.mathworks.com/help/matlab/ref/fprintf.html>

9 years ago | 0

Answered
difference of a vector, diff()
Use Matlab function block with this code function y = fcn(u) %#codegen y = diff(u);

9 years ago | 0

Answered
Compiled code can't find the Matlab runtime
<http://www.mathworks.com/products/compiler/mcr/>

9 years ago | 0

| accepted

Answered
How do I get more data out of Simulink model?
Set the sample time of your to workspace block

9 years ago | 0

Answered
How to take summation of different bins of histogram
A=randi(10,5,4,3) B=squeeze(sum(sum(A,1)))

9 years ago | 0

Answered
Getting pixel values from an image
You can use imread to import your image like this Im=imread('YourImage.tif') % for example row497=Im(497,:,:) You can ...

9 years ago | 2

Answered
how to do conversion from ycbcr to rgb in matlab?
<http://www.mathworks.com/help/images/ref/ycbcr2rgb.html>

9 years ago | 0

Answered
Symbolic summation within a for-loop
Look at this example syms f j k f=j*sin(k) for jj=1:10; ff(k)=subs(f,j,jj); s=symsum(ff(k), k, 1, 10); g...

9 years ago | 0

Answered
Why am I receiving 1 full integer less when dividing using fix()
To understand why the problem occurs, read this <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_eq...

9 years ago | 0

| accepted

Answered
How to convert 1D matrix to 3D matrix with specific order.
a=0.01:0.01:0.60 %you want a nxmxp matrix with: n=3 m=4 p=5 out=permute(reshape(a,p,n,m),[2,3,1]) You can apply this t...

9 years ago | 1

| accepted

Answered
Extract string form cell for sprintf
Example a={'abc'} use sprintf([a{1} '%d'],5)

9 years ago | 0

| accepted

Answered
Hello, any one help me, How can I write the expression and statements for these equations
G=1 kt=0:0.01:1 idx1=kt<0.22 idx2=kt>=0.22 & kt<0.8 idx3=kt>=0.8 G_d(idx1) = G*(1-0.09*kt(idx1)) G_d(idx2)= G*(0.9511...

9 years ago | 0

Answered
How can I save multiple Data.mat from an Simulink Model Output;
for ii=1:200 np = 800+i; % input variable to simulink model sim('Simulink_Model') % output data M(:,:,ii)=Data ...

9 years ago | 0

| accepted

Load more