해결됨


Sub-Diagonal Sum
Given a (m x n) matrix and a value r {1,-1}, change every element to the sum of the diagonal led by the element. r=1 > regular ...

2일 전

답변 있음
How can i do this on matlab?
roots([7 0 11 -2 5.98 10 15.9 1 5.347 11])

2일 전 | 0

답변 있음
defining a list of class instances
classdef Node properties Title NodeType NodeList RelationType Impor...

6일 전 | 0

답변 있음
Store prime and non-prime numbers in two diferent vectors from a .txt
Attach Natural_numbers.txt is below does not work m=readmatrix('Natural_numbers.txt'); idx=isprime(m); nonprime_num=m(~idx); ...

6일 전 | 0

답변 있음
Round to nearest ones place value ex ante
a=1400; b=2600; r=randi([a b]); abs(r-a)<abs(r-b);

6일 전 | 0

답변 있음
How can I plot a string input?
figure ax=gca; t = text(0.5,0.5,'David'); s = t.FontSize; t.FontSize = 12; ax.Visible='off';

6일 전 | 1

| 수락됨

답변 있음
How to write a script to test central limit theory
n=10; r=sum(randi(6,1000,n),2); m=mean(r); s=std(r); histogram(r,15)

6일 전 | 0

답변 있음
readcell function returns "failed to convert character code" error
Just use save command.

6일 전 | 1

| 수락됨

답변 있음
Error using horzcat Dimensions of arrays being concatenated are not consistent.
VD = depth; rho = Rho; ac = (1./Vp.*10^6).*0.000305; VES2 = (1/0.0313)*log(0.38./Phi); % Vertical effective stress by using At...

6일 전 | 0

답변 있음
How can I plot a string input?
I assume you want to display. display('David') txt =input('What is your name','s'); display(txt)

6일 전 | 0

해결됨


Pay up
You live in a world where arbitrary denominations of currency exist. You owe your friend a sum of money denoted by s. However, i...

6일 전

답변 있음
How to count the number of rows per group
A=[a,b,c]; u=unique(A,'rows'); d=zeros(size(A,1),1); idx=any(isnan(A),2); d(idx)=nan; f=find(~idx); for k=1:length(f) ...

6일 전 | 0

| 수락됨

답변 있음
i get this error "attempting to load ybus script as a function"
Not sure what you are doing, but works fine for me. z = [0, 1, 0, 1.0; 0, 2, 0, 0.8; 1, 2, 0, 0.4; 1, 3, 0, 0.2; 2, 3, 0, 0.2; ...

6일 전 | 0

답변 있음
How do I prevent MATLAB from converting characters into their ASCII equivalent?
A=repmat('*',1,10) A=repelem('*',10)

7일 전 | 0

답변 있음
How can I plot the graph of this double integral function in Matlab?
r = linspace(10^-2,10^2); eta=zeros(size(r)); hold on; for delta= [1 2 3 4 5 6] for k=1:numel(r) f=@(x,y) x.*exp(-3.44.*r...

7일 전 | 0

| 수락됨

답변 있음
Set different properties using for loop
Recommend a lookup table for the material. Then just index into when data is needed. matLookup=[0.26,5E-3,3.6,4.5E-9,0.28,820;....

7일 전 | 0

답변 있음
How to return logical array with only the longest row-consecutive equal to true
I = [0 0 1 1 1 1 1 1 0 0 0 0; 0 0 1 0 0 1 0 0 1 0 0 1; 1 1 1 1 1 1 0 0 0 0 0 0]; i=[zeros(size(I,1),1),I,zeros(s...

7일 전 | 0

| 수락됨

답변 있음
Why is my loop not running? (Error using / Matrix dimensions must agree)
Cannot multiply by the entire array (cp). %heat transfer % A(i) = -((L*D*(cp(i) - cinf)) + (kair*(Tp(i) - Tb))); B(i)...

9일 전 | 0

| 수락됨

답변 있음
how to compute random??
Run a simulation many times below. tol=.01; for k=1:1000 %I ran the simulation 1000 times n=rand(1,10000); An=cumsum(n)...

9일 전 | 0

| 수락됨

답변 있음
moving averag : Out of memory. The likely cause is an infinite recursion within the program.
m=readmatrix('TX.txt'); x=movavgFilt(m(:,2)',5,'Center');%data needs to be row vector

9일 전 | 0

답변 있음
Create a unit vector from two locations?
MTH2 = [0.472 1.364 0.06]; CoM = [0.471 1.147 0.903]; UnitVector = (CoM - MTH2) / norm(CoM - MTH2)

9일 전 | 0

답변 있음
Replacing value by the mean of the two nearest neighbors
B = [20; 18; NaN; 25; 100; 15; -50; 23; NaN; 15; -15; 30]; idx=find(isnan(B)); B(idx)=mean([B(idx-1),B(idx+1)],2); idx=find(B...

9일 전 | 0

| 수락됨

답변 있음
How to permute elements of jth column of a matrix iteratively
A=[1,2,3 ; 7,8,9 ; 13,14,15]; perms_of_(A,2) function A_perms = perms_of_(A,j) p=perms(A(:,j)); for i = 1:length(p) A_p...

11일 전 | 0

| 수락됨

답변 있음
How To change Diagonal Elements with a string in matrix using FOR loop or other preferred method?
a='ALEX'; b=diag(double(a)); b(b==0)=48; string(char(b)) char(b)

11일 전 | 0

해결됨


Easy Sequences 72: Complete Graph
In Graph Theory, we say a graph is a Complete Graph, if all of its nodes are connected to evey other nodes in the graph. Example...

11일 전

해결됨


Définir une fonction creneau
Definr une fonction "creneau" qui prend en entrée un vecteur et renvoie la valeur 1 pour chaque élément positif du vecteur et...

12일 전

해결됨


sinus de pulsation a
Ecrire une fonction sinat qui prend en entrée un vecteur t (de valeurs croissantes) et renvoie un vecteur y de de même dimensi...

12일 전

해결됨


Magic Matrix
We are all familiar with the concept of magic matrix. In a magic matrix, the summation of all rows, columns and both diagonals...

12일 전

해결됨


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

13일 전

해결됨


Loja de tintas
Faça um programa para uma loja de tintas. O programa deverá receber o tamanho em metros quadrados da área a ser pintada. Conside...

16일 전

더로드