Solved


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

3 years ago

Solved


Finding valleys
You have a vector of altitudes (units are arbitrary) and need to find the depths of all the valleys. You also need to determine ...

3 years ago

Answered
How can I loop through a column in a sub tables and convert non-cells to cells?
%Data to create the table posted arr1 = categorical(["Type1" "Typ2" "Type3"]); arr2 = categorical(["S1" "S2" "S3"]); Charge...

3 years ago | 1

| accepted

Answered
how to assign vpasolve results to a vector?
A_1 = 8.23714; A_2 = 8.19625; B_1 = 1592.864; B_2 = 1730.63; C_1 = 226.184; C_2 = 233.426; c1 = 1.701; c2 = 0.9425; p = ...

3 years ago | 0

| accepted

Answered
Plotting using given coordinates
The order of indices is not correct. I have corrected it - Edit - Updated answer below for a bigger data set of points %Modifi...

3 years ago | 1

| accepted

Answered
Getting different values when I run for loop twice
Your code is working properly. However, since you have not used a semi-colon to supress the statement defined for the else condi...

3 years ago | 0

| accepted

Answered
How to sort a cell array with respect to another cell array?
Here's one approach - %Note that this approaches requires the 1st row of cellA to be sorted cellA = {'A', 'B', 'C', 'D'; 1, 2...

3 years ago | 1

| accepted

Answered
Solving arrays in an equation to a variable
Quite a minor mistake. The loop index is of the last for loop is only length(dTb), that's why only the last value is obtained ...

3 years ago | 0

| accepted

Answered
How to create a 3-D Cardioid shape in MatLab? (a cylinder with a cardioid base)
Use the implicit equation of Cardiod as input to fimplicit3 and define x, y and z limits required - % 2-Dimensional Cardioid ...

3 years ago | 2

Answered
Get rid off white border in spectrum
It's not a border, it's the area of figure where there is no data to plot, and the white background is showing. You can either ...

3 years ago | 0

| accepted

Answered
delete the first and last character inside a char
charact = {'08126A';'05354A';'01406A';'09630A'}; y=regexprep(charact,'0(\d*)A','$1')

3 years ago | 1

| accepted

Answered
transform 1x12 cell to 3x4 cell
Use reshape A = {'5','11','69','85','114','169','188','196','250','258','267','295'} A = reshape(A,4,[])'

3 years ago | 0

| accepted

Answered
multiple graphs without spacing
You can use tiledlayout with the spacing between the tiles set to zero. Note that you will have to edit x-axes and y-axes prope...

3 years ago | 1

Answered
Hello! How do I replicate the matrix A1, A2, A3,......,An from a matric A0 by using loop?
It's not a good idea to name the variables like that. It's difficult to work with and harder to debug. Read more here - Why Vari...

3 years ago | 2

| accepted

Answered
how to integral by series
You can not add function handles together. Instead, you can add the integrals. format long f=0; for t=1:5 %I am assuming...

3 years ago | 1

Submitted


Supersonic flow over a Cone
Numerical Solutions to the Taylor-Maccoll Equation are obtained using 4th order Runge-Kutta Method for a supersonic flow over a ...

3 years ago | 8 downloads |

5.0 / 5
Thumbnail

Answered
Plotting a symbolic vector
You can remove the piecewise definition and use fplot from [0 b/2], then adjust the xlimits (and xticks) accordingly clc clea...

3 years ago | 0

| accepted

Answered
how to simplify a series of command
This is the downside of dynamically naming variables. Define an array instead of defining variables individually and use a loo...

3 years ago | 0

| accepted

Answered
Inverse input/output of switch case function
Add extra cases function [y] = my_func(x) switch x case 'name a' y = 'word i'; case 'name...

3 years ago | 1

Answered
How do I plot a horizontal line on my existing graph?
You need to use it as a separate command %Random data for example R = rand(10,1); k = rand; %plot the matrix plot(R) yli...

3 years ago | 1

| accepted

Answered
I have a problem in plotting ilaplace!!
@Iqbal Batiha, First check if your license has access to the Symbolic Toolbox. Run this command and check the output - status =...

3 years ago | 0

| accepted

Answered
how do I combine terms with a common power in a polynomial
"What I really want is to not have the sigmas at all, ie. just mutiply them out. Is this possible?" It is possible. From the d...

3 years ago | 0

| accepted

Answered
How to dispaly result value?
Use sprintf with disp N=5; %Create text str = sprintf('N=%d', N); %d is the modifier for signed integer %see the links att...

3 years ago | 0

| accepted

Answered
A compact way to assign values of a matrix to another matrix
Since y is a logical array, any values assigned to it will be converted to corresponding logical value. Convert y into double a...

3 years ago | 1

| accepted

Answered
How can I test that tab values exist in other sequence?
vect = [5 34]; seq=[1 2 3 4 5 12 15 20 23 25 30 34 35 40]; [~,ind] = ismember(vect, seq) Note that this only returns the f...

3 years ago | 0

| accepted

Answered
How does the function "solve" deal with infinite solutions? Why can't it show all the solutions?
"Why can't it show all the solutions?" It does, but that requires proper syntax syms x y eq = sin(x)-sin(y); st = [x -x+2*pi...

3 years ago | 0

| accepted

Solved


Calculate the volume of the intersection of two balls
Consider two balls (solid spheres) in , with radius and respectively. Suppose that the distance between the centers of the two...

3 years ago

Answered
How do you get first n number of solutions while solving numerically ?
k = 1.3333e+06; L1 = 0.5; f = @(beta) beta.^3.*((sin(beta*L1).*coth(beta*L1))-cos(beta*L1))-(2*k*sin(beta*L1)); %plotting t...

3 years ago | 2

| accepted

Solved


Sign of IEEE Single
Output the sign bit of the IEEE representation of the single-typed 32-bit float input as the uint8 "1" or the uint8 "0".

3 years ago

Answered
how to use the subs syntax for the two variable
"when is use the subs synatx to replace the value of a in series1 it is not replacing the vlue of a ." When you define a=0.56, ...

3 years ago | 0

| accepted

Load more