답변 있음
Array Indexing through a random plane or random line
You can save the Slice into a variable which be of a class matlab.graphics. From this variable you can extract what you want. ...

13일 전 | 0

| 수락됨

답변 있음
what changes are required in the code?
A table would be good to deal with. name = {'mary','john','anna','paul','elaina'}' ; gender = {'f', 'm', 'f', 'm', '...

13일 전 | 1

| 수락됨

답변 있음
how to randomly assign values from a vector and store it in another vector?
Read about randperm. load('detected.mat') idx = randperm(length(detected)) ; alocados = detected(idx) ;

13일 전 | 0

답변 있음
what is the "count" mean?
[v1,count]=fscanf(fid,'%f',[2,numpt]); % reading data from the file into 2 rows and numpt coulmns; count gives you total nu...

13일 전 | 1

답변 있음
what wrong I am doing in the code?
% Make required structure S = struct ; S.name = {'mary','john','anna','paul','elaina'} ; S.gender = {'f', 'm', 'f', ...

13일 전 | 1

답변 있음
how do I know which toolboxes are installed?
https://in.mathworks.com/matlabcentral/answers/93913-how-can-i-determine-what-add-ons-i-have-installed https://in.mathworks.co...

14일 전 | 0

답변 있음
How to compute the area and the distance?
Area can be computed using area or by writitng your own formula. Distance can be calculated using the formula. Tp get distan...

14일 전 | 0

| 수락됨

답변 있음
Error in saving Edge file?
You have used two hypens before ascii, make it to single hypen and also there is a change in the sprintf command. save(sprintf...

14일 전 | 0

답변 있음
Reading excell sheet, Index exceeds the number of array elements (333)
Don't use xlsread. Use readtable. T = readtable(myfile) ;

14일 전 | 0

| 수락됨

답변 있음
Play music from user input
song = input('Enter link to you favorite song : ','s'); % <---- changed here fullname = 'song'; %change as required t...

14일 전 | 0

답변 있음
I can't output my data into excel in rows even though it is a 17x1 array
USe write2table. Read about it.

15일 전 | 0

답변 있음
Multiply each element of matrix with corresponding element of another matrix by not using loop. Is there any other more efficient way?
Mer_EXP_rev = Prod_Year.*fundamental_price_level; Read about element by element operations. https://in.mathworks.com/help/mat...

15일 전 | 0

| 수락됨

답변 있음
Storing individual elements of vector in cell.
x=[2 45 13] num2cell(x)

15일 전 | 0

| 수락됨

답변 있음
code for this pattern
https://in.mathworks.com/matlabcentral/answers/184273-how-to-write-a-program-to-draw-a-triangle-of-stars-in-matlab

15일 전 | 0

답변 있음
Select lines on a surf plot and output indices
Just use surf(20*log10(abs(s)),'EdgeColor', 'k') Use getpts or ginput or daatip, this will give you location/ index where yo...

15일 전 | 0

답변 있음
Takin the mean of data in tables
X1=[9 6 9;3 2 7]; X2=[0 2;4 0]; X3=[3 1 2; 8 9 7]; X=table(X1,X2,X3) ; [m,n] = size(X) ; iwant = zeros(2,n) ; for i = 1:n...

15일 전 | 0

| 수락됨

답변 있음
how to resample a data from 37 layers to 34 layers?
Read about interpn. A = rand(1076,915,34) ; [m,n,p] = size(A) ; [X,Y,Z] = ndgrid(1:m,1:n,1:p) ; [Xi,Yi,Zi] = ndgrid(1:...

15일 전 | 0

| 수락됨

답변 있음
I have a square matrix of ones and zeroes and I am trying to change all the ones to a user entered number. I am only successfully changing the first value in the matrix.
A = rand(3) ; A(A<0.5) = 0 ; A(A>=0.5) = 1 ; idx = find(A==1) ; for i = 1:length(idx) [r,c] = ind2sub(size(A),idx(...

15일 전 | 1

| 수락됨

답변 있음
How do I declare a blank column vector of unknown size?
O = zeros(n,1) ; % Initiate a zeros column vector N = NaN(n,1) ; % initiate a NaN column vector iwant = zeros([],1) ; ...

15일 전 | 0

| 수락됨

답변 있음
How to fit the data with passing specific point and specific function
x=[0 0.166666667 0.333333333 0.5 0.666666667 0.833333333 1]' ; y=[0 1.09162 1.71904 2.52173 1.20849 2.47433 0]' ; n = 3; %...

15일 전 | 1

| 수락됨

답변 있음
question about result in matlab
Becuase n is a class of sym. Use double. double(n) Also note that you need not use syms to achieve this. Frame your matrices a...

15일 전 | 0

답변 있음
how to find value in the matrix using index?
Read about MATLAB matrix indexing. If A is a matrix, you can extract (i,j) element using A(i,j). Also have a look on ind2sub an...

15일 전 | 0

| 수락됨

답변 있음
Unable to compute a taylor expansion
syms x f = log(x); T1 = taylor(f,x,'ExpansionPoint',1,'order',1); T2 = taylor(f,x,'ExpansionPoint',1,'order',2); T4 = taylor...

16일 전 | 1

| 수락됨

답변 있음
how do I build the a beam deflection graph ?
q0 = 1 ; E = 140 ; L = 1000 ; v = -0.7 ; beamDeflection(v,q0,L,E) ; function beamDeflection(v,q0,L,E) %for x=0:10...

16일 전 | 0

답변 있음
How to Plot data in excel sheet using MATLAB ?
Your excel file has no much data. You can read the data from excel file into workspace using readtable. T = readtable('test.xls...

16일 전 | 1

답변 있음
how to solve the error'The grid must be created from grid vectors which are strictly monotonically increasing'.
You code needs lot of changes. This line: [X1,Y1]=meshgrid(lon(1):0.5:lon(end),lat(1):0.5:lat(end)); should be replaced with...

16일 전 | 0

답변 있음
How can I remove the error " Not enough input arguments" of nlinfit?
Replace your modelfunction with: modelfun = @(x,b)(b(1)*(x-1)).^(k-1) + b(2)*(x-1).^(k-2)+b(3)*(x-1)+b(4);

16일 전 | 0

답변 있음
x0=(1, 1, … , 1(5000), 0, 0, … ) , how we can input this value in matlab
Read about repmat, repelem, linspace and : operator

16일 전 | 0

| 수락됨

답변 있음
Interpolation is wrong?
x=dep_cal2012; % 977x1 y=wc_average; % 78x1 ix = linspace(1, numel(y), numel(x)); WC_interp = interp1(1:numel(y), y,ix,'ne...

16일 전 | 0

답변 있음
Adding zeros in the empty places in a matrix.
A = rand(252,1) ; iwant = zeros(252,1) ; idx = [1 13 25 73 121 109 97 61] ; iwant(idx) = A(idx) ;

19일 전 | 0

| 수락됨

더로드