Answered
Get properties of histogram in MATLAB r2012a
x= [1 2 3 4 5]; nbins = 20; hist(x,nbins) set(gcf) set(gca)

10 years ago | 1

| accepted

Answered
I want to delete some lines from a .txt file
fid=fopen('12-04-16-10-01-16.txt') M=textscan(fid,repmat('%f ',1,16)) fclose(fid) out=cell2mat(M)

10 years ago | 0

Answered
I want to delete some lines from a .txt file
line='I want to delete 123 lines from 24 .txt file 0.458 and67.45' out=regexp(line,'\d+(\.)?\d+','match')

10 years ago | 0

Answered
Could someone please help me create a three-column array?
out=[measles(:),mumps(:),chickenPox(:)]

10 years ago | 0

Answered
random matrix with specific condition in matlab ?
B=randi([0 1],size(A)) B(:,1)=A(:,1) B(2,:)=A(2,:)

10 years ago | 0

Answered
errors in matlab function block in simulink
Your code is not correct. Plus, generating a puls train with Matlab function is not a good idea. You have to know that your Matl...

10 years ago | 0

Answered
How to get output of [110,40] from input of FindAbnormal([65, 95, 110, 80, 40]) using relational and logical operators?
Use logical or | instead of logical and & a number that satisfies a two conditions <60 and >100 doesn't exist! But you ca...

10 years ago | 2

| accepted

Answered
I am having trouble getting a code to read in elements of an array. Please help?
grades = [82, 90, 75, 94, 88, 99, 45, 90]; for a=grades if a<60 display ('grade = F') elseif a>=60 & a<70 ...

10 years ago | 0

Answered
Displaying images side by side with imshow
folder='yourfolder' A=[]; for i=1:33, %Insert the number of images that are in the "run" folder name = sprintf...

10 years ago | 0

| accepted

Answered
Dear sir how to writer summation and limit equation in matlab ?
Use sum function <http://www.mathworks.com/help/matlab/ref/sum.html>

10 years ago | 0

Answered
How does one count the characters in an array?
value='1111' out=numel(value)

10 years ago | 0

| accepted

Answered
Divide elements between 2 matrices
M1 =[4 3 6 8 1 10 5 2 9 4 5 6 1 10 3 9 4 2 5 7 6 5 4 3 9 5 1 7 8 10 3 4 2 6 5 1]; M2 =[1 6 3 5 3 5 9 6 2 ...

10 years ago | 0

| accepted

Answered
How to find consecutive number of strings along with their starting position?
v={'a','a','a','b','b','a','a','c','c','d','d'} idx=ismember(v,'a') ii=strfind([ 0 idx],[0 1]); jj=strfind([idx,0],[1 0]); ...

10 years ago | 0

Answered
Replace value from cell from particular index
cell1=[1 1 1; 1 1 1; 1 1 1]; cell2=[0 0 0; 0 0 0; 0 0 0]; ii1=[2 2] ii2=[2 2] cell1(ii1(1),ii1(2))=cell2(ii1(1),ii1(2))

10 years ago | 0

| accepted

Answered
find result from multiple if and range value
*Edit2* r=[0.0 .068 7.0 0.069 0.137 6.5 0.138 0.205 6.0] a=0.032 b=mat2cell(r(:,1:2),ones(size(r,1),1),2) idx=cel...

10 years ago | 0

| accepted

Answered
how to perform this matrix manupulation..?
Do not label them with different variables, just store them in a cell array <http://matlab.wikia.com/wiki/FAQ#How_can_I_crea...

10 years ago | 0

| accepted

Answered
Why k = 1.000000000000000 but k == 1 returns 0?
<http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

10 years ago | 0

Answered
i didn,t get any values in command window from this code
Just type the variable you need to display ha Or remove the semicolon ; at the end of the lines of your code

10 years ago | 0

| accepted

Answered
Adding multiple elements from an array
You have 8x8 matrice, then read it from excel, then do whatever you want.

10 years ago | 0

Answered
In/out signal from vector
v=[0 0 0 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1] ii1=strfind(v,[0 1])+1 ii2=strfind(v,[1 0])+1 ...

10 years ago | 0

| accepted

Answered
if i have a vector , i want to subtract it with value ?
You need to read about arrays and matrices <http://www.mathworks.com/help/matlab/matrices-and-arrays.html> and before asking yo...

10 years ago | 0

Answered
How to find arrays in matrix
*Edit* [ii,jj]=ismember(A,B(:,1)); C=B(jj(ii),:)

10 years ago | 1

| accepted

Answered
Find the summation of the outer elements of a rectangular matrix
out=sum([a(1:end-1,1)' a(end,1:end-1) a(2:end,end)' a(1,2:end)])

10 years ago | 1

Answered
Modifing a specific matrix that is corresponding to an indexing matrix
I suppose your data are A=[ 2 1 5 4 3; 3 2 1 4 5; 1 3 2 5 4; 2 5 4 1 3] B=[53 53 53 53 53; 19 19 19 19 19; 55...

10 years ago | 2

Answered
how i can put the (-1) in binary matrix with condition ?
A = [ 1 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 0 ] for k=1:size(A,1); id_before=strfind(A(k...

10 years ago | 0

| accepted

Answered
How to input logical value to From Workspace Block?
If you want to use a=[1 0 1] as a constant, then use constant block. To use it as a signal you can use a from workspace block. I...

10 years ago | 1

| accepted

Answered
how can i make a GUI file of simple pendulum
If you know how to create a GUI with guide Matlab <http://www.mathworks.com/videos/creating-a-gui-with-guide-68979.html> you can...

10 years ago | 0

Answered
How to calculate time duration between two time intervals
Use etime function v={'1/28/2016 2:23:31.996 PM' '1/28/2016 2:25:27.808 PM' '1/28/2016 3:20:30.925 PM' '1/28/2016 3:22:29....

10 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions error in line 17.
Check if line was not used as a variable. try this before you code clear line

10 years ago | 0

Load more