Shubham Gupta
Estadísticas
4 Preguntas
101 Respuestas
0 Problemas
208 Soluciones
CLASIFICACIÓN
287
of 281.853
REPUTACIÓN
292
CONTRIBUCIONES
4 Preguntas
101 Respuestas
ACEPTACIÓN DE RESPUESTAS
75.0%
VOTOS RECIBIDOS
33
CLASIFICACIÓN
of 19.062
REPUTACIÓN
N/A
EVALUACIÓN MEDIA
0.00
CONTRIBUCIONES
0 Archivos
DESCARGAS
0
ALL TIME DESCARGAS
0
CLASIFICACIÓN
752
of 134.205
CONTRIBUCIONES
0 Problemas
208 Soluciones
PUNTUACIÓN
2.402
NÚMERO DE INSIGNIAS
5
CONTRIBUCIONES
0 Publicaciones
CONTRIBUCIONES
0 Público Canales
EVALUACIÓN MEDIA
CONTRIBUCIONES
0 Temas destacados
MEDIA DE ME GUSTA
Content Feed
Optimizing for loops by searching some data in cell arrays
I tried cellfun() to get the desired output without using for loops: x = cellfun(@(c)c(find(c==t_interpl(t_ref_cnt))+size(c,1))...
casi 3 años hace | 1
how to plot to my m file
To plot a function, you can use: fplot() link: fplot
casi 3 años hace | 0
Pregunta
Function browser is empty
In MATLAB command window, one should be able to access Function Browser to quickly see the syntax for a particular function. To ...
alrededor de 3 años hace | 0 respuestas | 0
0
respuestasDatenum with a.m. and p.m.
Assuming there is ".m. EST" attached to each "timestamp" at the end. You can follow the steps: Step-1 Replace ".m. EST" to just...
casi 4 años hace | 1
| aceptada
Trying to count number of cells between two columns
In the code that you have shared whichDistance is an empty matrix. So when you do raw(whichDistance, :)=[]; raw array doesn't ...
casi 4 años hace | 0
index array to access the value in matrix
Step1 - Convert the subscript to indeces using x & y(Hint: sub2ind) Step2 - Calculate values of IM for calculated indeces Step...
casi 4 años hace | 0
| aceptada
Writing a Function Code
Try: function out = timeconv(t) y = datestr(round(t/900)*900/(24*60*60),'HH:MM AM'); end
casi 4 años hace | 0
How to find the maximum value for each 24 rows in an array?
According to the comments, you have provided, this will produce the desired output : yd = max(max(mn2t)); % first find maximum ...
casi 4 años hace | 1
| aceptada
how to index a cell array?
Try : area_r = arrayfun(@(a) cellfun(@(c) trapz(c(c>=0)),a.elevation,'UniformOutput',false), K, 'UniformOutput',false); I hope...
casi 4 años hace | 0
| aceptada
Getting an empty plot
Try: clear; x = linspace(5.62,31.62); p = -10*log10((1+ (31.5844 * (x.^2)) + (11.24*x*cos(pi)))./ (32.5844*(1 + (x.^2)))); % ...
casi 4 años hace | 1
| aceptada
Legend in a "for loop"
Try : for ii=1:length(giri) figure(3); plot(m(indice_m_0:loc(ii)),psic_pos(ii,indice_m_0:loc(ii)),'DisplayName',['ii = ',num2...
casi 4 años hace | 1
How can i return a value based on mutliple fields?
Try: id = find(N2.Components(:,1) == 290 & N2.Components(:,2) == 296); PowerConsequences_out = N2.PowerConsequences(id); ICTC...
casi 4 años hace | 0
| aceptada
Sub function error within main function
Try: function volSAtsa(l , w, h) vol = volume (l, w, h); [a1, a2, a3] = sides(l, w , h); tsa = total(a1 , a2 , a3); out(vol...
casi 4 años hace | 0
How can I make the numbers count horizontal instead of vertical?
Try a = input('What is the size of the square array? (Enter one number): ','s'); sq = str2num(a); elements = 0; for x = 1:sq...
casi 4 años hace | 0
| aceptada
Plotting daily mean values of temperature
Assuming there are no leap years in this period of time, I think you have a vector of dimesion (35040x1) (2samples*24hrs*365days...
casi 4 años hace | 0
In an assignment A(I) = B, the number of elements in B and I must be the same.
Your: A(17:240) % is a vector of 224 elements ((240-17+1)x1) while B % is a vector of 18 elements (18x1) that's why you are...
casi 4 años hace | 0
| aceptada
how to modify input-output script to show how many line were copied.
Try: ifn = input( 'input file name: ', 's' ); ofn = input('output file name: ', 's' ); ih = fopen( ifn, 'r' ); oh = fopen(...
casi 4 años hace | 0
| aceptada
Surface area of sphere integral form
Limits should be [0, pi/2] & fun should be sin fun = @(theta) sin(theta); S = 4*pi*R^2*(integral(fun,theta_1,theta_2/2)); % t...
casi 4 años hace | 0
How to extract Month string from day_Month_Year time variable and create a new quarterly time index?
If I understand the question correctly, this should work : Month_variable = datestr(datenum('Oct_01_2019'),'mm'); I hope it he...
casi 4 años hace | 0
| aceptada
problem in running time of my project
I changed one simple thing, it was working more efficiently for me: clc clear; tic; Input = [ 5 12 0.02 4 ...
casi 4 años hace | 0
| aceptada
How can I format a large cell of data into one big column underneath a (predeclared) title?
Try this: my_storage = titles; %foo, bar, fubar header titles my_storage_mat = [transpose(theS...
casi 4 años hace | 0
| aceptada
How do I delete multiple elements from a column array using a while loop?
This should do the job: A = [1 0 1 0 1 0 1 0]'; A(A==0) = []
casi 4 años hace | 1
How do I create a matrix surrounding the center element?
Try: n = 5; A = zeros(n); [r,c] = find(A==0); sub = [r,c]-(n+1)/2; for i = 1:(n-1)/2 ind = find((sub(:,1)==-i&sub(:,2)>=-i...
casi 4 años hace | 1
| aceptada
a zero finding function
Hint: (for small x). You can rewrite the equation . I think rest you can solve using linear algebra.
casi 4 años hace | 0
How can i solve?
Below code worked for me : rng default tsim = 0:0.002:10; % simulation time Amp = {-7,-5,-3,-1,1,3,5,7}; % Amplitudes dt = 0...
casi 4 años hace | 0
| aceptada
How can I move through an array and a vector that need to be compared?
My undersanding for the question. For example you have a coordinates of 4 test planes (X) & coordinate for a separate referenc...
casi 4 años hace | 0
Summation of vectors: use of sum function in loop
I think Newvalue=(1/t)*sqrt(Value); should be outside the for loop : vector=[1;2;3;4;5;6]; vectortwo=[1;3;4;5;6;8]; s=leng...
casi 4 años hace | 1
| aceptada
Converting a string to datenum format
Try: DateString = '2011-08-31T21:16:01.948Z'; RepExp = '[a-zA-Z]'; % want to replace any alphabet, indicated by [a-zA-Z] RepS...
casi 4 años hace | 0
Problem with computing integral of a function
Using some info from this question, which you have posted again. My understanding is that you want to calculate Phi at each n & ...
casi 4 años hace | 0
How to get text file from char
Try : clc; clear; tic fid = fopen('myFile.txt','w'); % open text file b = sprintf('0123456789'); d = 0; T = char; for ii...
casi 4 años hace | 0
| aceptada