Answered
How to scale the Tick Label by a number?
A=randi(64,64) image(A) xt=arrayfun(@num2str,get(gca,'xtick')*0.05,'un',0) yt=arrayfun(@num2str,get(gca,'ytick')*0.05,'un',...

10 years ago | 3

| accepted

Answered
how to creat textfile with matlap in my computer
There is no a code called a text file creation. That depends on what you want to put in your text file. Look at these function ...

10 years ago | 0

| accepted

Answered
Does Matlab have the function to format script?
Select your code, then right click with your mouse, you will see all possibilities you have. For example (ctrl+i) which is smart...

10 years ago | 14

Answered
How can I add leading zeros in a column vector?
v=[0 1 2 3 59 100 101]' w=arrayfun(@(x) sprintf('%04d',x),v,'un',0)

10 years ago | 3

| accepted

Answered
How can I use FROM WORKSPACE CYCLIC REPETITION in Simulink?
When you choose cyclic option, set your variable in the bloc "from worskspace" like below: y.time=[ ] y.signals.values=[ 0...

10 years ago | 3

| accepted

Answered
Combine numerous arrays with similar names
The first solution is to change your code, by storing all your data in one array or one cell array. If i't's not possible for r...

10 years ago | 0

| accepted

Answered
How to convert char to number?
B=sprintf('%02d\n',A) sprintf is used to display your data A in a format of your choice, your data are converted to string ...

10 years ago | 0

| accepted

Answered
How can I format some numbers and pad them with zeros?
A=[8.23 98.36 78.255 100.56] B=sprintf('%06.2f\n',A)

10 years ago | 1

| accepted

Answered
legend code doesn't work
x = -pi:pi/20:pi; y1 = sin(x); y2 = cos(x); plot(x,y1,x,y2) l = legend({'sin(x)','cos(x)'}); title(l,'My Legend Title')

10 years ago | 0

Answered
How can i divide a circle into 12 parts? 6 sectors having 15 degrees and the rest 6 having 30 degrees?
t=-pi:0.01:pi; r=1; x=cos(t); y=sin(t); plot(x,y) axis square hold on t1=linspace(-pi/2,pi/2,7) x1=cos(t1); y1=sin(t1...

10 years ago | 0

| accepted

Answered
Summing matrices in cell array
A={[1 2 3];[4 5 6];[7 8 9]} out=cellfun(@sum,A) If A is like this A={{1 2 3};{4 5 6};{7 8 9}} out=cellfun(@(x) sum(x...

10 years ago | 0

Answered
find the closest value
A = [01 105 6; 01 203 12; 02 99 6; 02 306 15] B = [01 0 0; 01 100 25; 01 200 50; 01 300 75; 02 0 0; 02 100 25; 02 200 50; 02 ...

10 years ago | 0

| accepted

Answered
How to supress a warning message ?
You have created a function called *max.m* which is the same name as a built-in Matlab function. Go in your current folder, and ...

10 years ago | 0

| accepted

Answered
what does 'license manager error - 103' men? and can i overcome this?
<http://www.mathworks.com/matlabcentral/answers/91874-why-do-i-receive-license-manager-error-103>

10 years ago | 0

Answered
how to have a correct array format
You can display your numbers with the format of your choice a=12.123456789, sprintf('%.6f',a)

10 years ago | 0

Answered
How to convert 'comma' to 'dot'?
a=importdata('test2.txt') b=strrep(a,',','.') c=cell2mat(cellfun(@str2num,b,'un',0))

10 years ago | 2

Answered
How to get the count of continuous occurrence of specified name in the table
a={'Name5' 'Name2' 'Name2' 'Name1' 'Name3' 'Name2' 'Name2' 'Name2' 'Name2' 'Name5' 'Name3' 'Name3' 'Name2' 'Name2...

10 years ago | 0

| accepted

Answered
How do I fill a rectangle (or circle) in a matrix?
K=ones(30); theta=0:.001:7; radius=10 [X,Y] = pol2cart(theta,radius); A=[round(X)+radius]+1; B=[round(Y)+radius]+1; ring...

10 years ago | 0

Answered
doubt to store a array values in for loop ?
a=[1 2 3 4 5 6 7 8 9 10] ii=0 for i=1:3:10 ii=ii+1; k(ii)=a(i) end

10 years ago | 0

Answered
getting the day of the week for a given date
d='jun-08-2016' d=datestr(d,'mmm-dd-yyyy') datestr(d,'mmm-ddd-yyyy')

10 years ago | 1

| accepted

Answered
Generator matrix for repetition coding
*Edited* u=3; q=2; C=zeros(u,q*u); jj=1:q; for k=1:u C(k,jj)=1; jj=jj+q; end C %Or u=4 q=3 C=zero...

10 years ago | 0

| accepted

Answered
max and min complex number
If |x1=1.1+2*i| and |x2=1+2.1*i| What is the smallest number ? You can't compare two complex numbers, you can compare their mod...

10 years ago | 0

Answered
How to change values of specific elements inside a matrix?
idx=y>100 y(idx)=y(idx)/10

10 years ago | 0

| accepted

Answered
Easy columns merge question
A = [1 NaN 3 NaN 5 6] B= [NaN 2 NaN 4 5 6] C=unique([A B]) C(isnan(C))=[]

10 years ago | 0

Answered
How to determine a value within a range?
A=randi(1000,1,100) out=sum(A>=100 & A<=500)

10 years ago | 1

Answered
How to truncate the values in a column?
a=1000000001; b=sprintf('%05d',a-10^9)

10 years ago | 0

Answered
How to split strings lines to Matrix columns?
A={'100010001000' '100000000000'} M=cell2mat(cellfun(@(x) x-'0',A,'un',0))

10 years ago | 0

| accepted

Answered
Fastest way to have a matrix with intersected elements only between matrix and array
A=[0.1 0.2 0.3 0.3 0.5 0.7 0.8 0.1 0.9] B=[0.1 0.5 0.3] idx=ismember(A,B) A(~idx)=0

10 years ago | 0

Answered
Hi,Is there anyone who could give an idea how to create a permutation vector?
V1=[1 2 3 5 4] n=numel(V1) idx=randperm(n) V2=V1(idx)

10 years ago | 0

| accepted

Answered
How to delete and change string in cell array?
s={'1313406900.Mon.Aug.15_11_15_00.GMT.2011.nordzee1.cx.plan.bar';'1313406900.Mon.Jun.17_12_15_00.GMT.2011.nordzee1.cx.plan.ba...

10 years ago | 0

Load more