Respondida
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',...

alrededor de 10 años hace | 3

| aceptada

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 14

Respondida
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)

alrededor de 10 años hace | 3

| aceptada

Respondida
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...

alrededor de 10 años hace | 3

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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)

alrededor de 10 años hace | 1

| aceptada

Respondida
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')

alrededor de 10 años hace | 0

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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>

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 2

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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

alrededor de 10 años hace | 0

Respondida
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')

alrededor de 10 años hace | 1

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 0

| aceptada

Respondida
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))=[]

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 1

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

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 0

| aceptada

Respondida
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

alrededor de 10 años hace | 0

Respondida
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)

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Cargar más