Answered
Problem with if statements
e=["H","Li","Be","B","C","N","O","F","Na","Mg","Al","Si","P","S","Cl","K","Ca",... "Sc","Ti","V","Cr","Mn","Fe","Co","Ni","...

3 years ago | 0

| accepted

Answered
Is there a way to create a loop for reading multiple Excel files at once?
time=[130,230,330...]; for i= 1:length(time) lum(:,i)=csvread(sprintf('PAR_TOP_%d.csv',time(i)),3,2); end

3 years ago | 0

| accepted

Answered
The results display problem
A= [1.02 0.95 0.77 0.67 0.56 0.30 0.16 0.01]; b = [0.39 0.32 0.22 0.18 0.15 0.12 0.13 0.15]; for i = 1:4 num = 10.^(-i);...

3 years ago | 0

| accepted

Answered
How to Call a Function Within a Script?
%execute function dydt=vdp1000(t,y);%must assign t and y prior to executing the function function dydt = vdp1000(t,y) dyd...

3 years ago | 0

Answered
Hi , i want to build a matrix
C=rand(1,3); B=rand(3,1); A=rand(3,3); n=size(A,1); a=eye(n); y=4; H=diag(repelem(C*B,n*y)); for k=-1:-1:-n*y+1 a=a+A^...

3 years ago | 0

| accepted

Answered
The summation of elements between two numbers
yourMatrix=rand(7,18)*90+10; s=sum(yourMatrix(yourMatrix>=35&yourMatrix<=55))

3 years ago | 0

| accepted

Answered
Solving equation with one variable but it is present in the equation twice
It is easy to just solve for x in your equation and have an equation in Vout. f=@(Vout)(211200-1000*Vout)./(Vout+211.2); f(100...

3 years ago | 0

Answered
how to separate columns from txt file
Try: c = readtable("r4.4u_db.txt",'Format','%f %*c %f %*c%*c%*c %f %*c%*c');

3 years ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 272.
What are you trying to do? You cannot index into mean_value_data_smoth with a value greater than its size (272). You are indexin...

3 years ago | 0

Solved


Just square the input
Square the number

3 years ago

Answered
How do you replace NaN values in column n with the average of the all the values in column n?
r=rand(9172,27); r(randi(247644,1,10000))=nan;%add some nan's m=mean(r,'omitnan'); [~,idx]=find(isnan(r)); r(isnan(r))=m(idx...

3 years ago | 0

Answered
How to simplify a complicated output of a function with only double coefficients
Look at digits and vpa %just take the vpa of the result to however many digits of accuracy. digits 10 vpa(newton_interpolatio...

3 years ago | 0

| accepted

Answered
How do I change Array element with another array element?
A = [0 0 0 0]; B = [1 1 0 0]; A=B

3 years ago | 0

Answered
fplot graph error getting y=0
There is a sinularity around -5.6e-4 (advoid this area) math=@(x)0.6.*x.^3.*exp(-0.4./x)+1.5.*x.^2.*exp(-0.6.*x); fplot(math,[...

3 years ago | 0

| accepted

Answered
Base-2 logarithmic scale on bar diagram
A logarithmic scale does not matter what the base is. You can change the markers to whatever you want (powers of two). figure; ...

3 years ago | 0

| accepted

Answered
The plot of cosine is not shown
xt will always be 1 and is plotting correctly. cos(2*pi*100*t) will always be an interger multiplied by 2*pi, and cos(2*pi)==1.

3 years ago | 0

| accepted

Answered
How to fit lognormal distribution on my data
Look at lognfit [pHat,pCI] = lognfit(repelem(vector1,vector2));

3 years ago | 0

Answered
Triangle Circle Dataset Creation
Look at polyshape

3 years ago | 0

Answered
How to compare two arrays of strings?
Use string arrays instead of character arrays. A=["red","purple","blue","green"]; B=["orange","purple","yellow","green"]; C=B...

3 years ago | 0

| accepted

Answered
problem with condtitions in program
Hard to understand what you are trying to do. Looks like you are good to about 72. t=[0.0840000000000000,0.935000000000000,1.83...

3 years ago | 0

Answered
Hi there, does anyone know how to help me resolve this issue? My code keeps running on and on. If you can help me figure the issue please :)? And also the plots are not showin
You are getting stuck in your positionfourbar() while loop. You need to evaluation your equations and comparison to epsilon.

3 years ago | 0

Solved


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

3 years ago

Answered
Get MatLAB to read data instead of text
Try readtable t=readtable('yourFile.csv');

3 years ago | 0

Answered
Add Letters in a sequence
l='abcdefghijklmnopqrstuvwxyz'; gap='defjklmrstuvwz'-96; l(gap)='-'

3 years ago | 1

| accepted

Solved


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

3 years ago

Answered
Why does my else doesnt work?
a = [-3.821; 0.135; 5.995; -5.557; -4.041; -3.094; -3.244; -3.074; -1.241; -4.216; -2.834; -0.424; 5.337; -0.088; 2.985; 4.136;...

3 years ago | 1

| accepted

Solved


Cricket - Report the Result (Part I: Limited Overs)
Given two scalar strings representing the scores for a limited-overs match, return a string reporting the result in the form "Te...

3 years ago

Solved


Cricket - Peak Batting Average
Given a vector s of strings representing a batter's individual innings scores (in chronological order), return the highest batti...

3 years ago

Solved


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

3 years ago

Load more