Respondida
How do I make an entire row in a table NaN?
T(isOff,:) = {NaN};%does this work?

más de 3 años hace | 1

| aceptada

Respondida
Need Help for the rest of this coding
function [ABrow, BAcol, FirstHalfA_LastHalfB] = vectorFun(A, B) ABrow = [A,B']; BAcol = flip(ABrow)'; FirstHalfA_LastHalfB = ...

más de 3 años hace | 2

| aceptada

Respondida
Producing 100 prime number in a vector
p=(2:1:600); p(isprime(p)) primes(600)%better and faster

más de 3 años hace | 3

| aceptada

Respondida
Select range of rows and store them
Use of cell array for storage incase the sizes are not equal. If the sizes will always be the same, you could store in 3D-matrix...

más de 3 años hace | 2

| aceptada

Respondida
please guide me how to call a function in matlab codes
Function runs fine. File='sunrise.jpg'; ImageProcessing(File) function ImageProcessing(File) % Read the Image ...

más de 3 años hace | 0

Respondida
Change certain values in an array to a word
Not sure why you want a mixed array of numbers and strings (not a good idea). idx=~ismember(T,[-2 -10 -30 2 10 30])&PP~=0;%logi...

más de 3 años hace | 0

| aceptada

Respondida
Count the number of double in the the rows of a table
loop through your table C=zeros(size(yourTable,1),1); for k=1:size(yourTable,1) c=0; for m=1:size(yourTable,2) ...

más de 3 años hace | 0

| aceptada

Resuelto


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

más de 3 años hace

Resuelto


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

más de 3 años hace

Resuelto


Dice roll - lateral faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

más de 3 años hace

Respondida
how can I plot this function?
t = linspace(-5,5,1000); N = 1000;n=1:N; an = (100*n*pi.*(-1).^(n+1).*(1000-121*n.^2*pi^2))/(((1000-121*n.^2*pi^2).^2 + (1320...

más de 3 años hace | 0

Resuelto


Easy Sequences 78: Trailing Zeros of Factorial Numbers at any Base
Given an integer and a number base , write a function that calculates the number of trailing zeros of the factorial of when wr...

más de 3 años hace

Respondida
nonlinear equations system with a changing parameter
A =@(x,T)3.8e-4./T./(0.4-2.*x).^3; B =@(x,T) 5e7.*(0.83-1.154.*x+1.7e-5.*T.*(log(A(x,T))+3.912))./(1-(0.2308-1.154.*x).*(0.6+1....

más de 3 años hace | 0

| aceptada

Respondida
Generate all permutation or possibilities
x='locate'; p=[];order=3; n=nchoosek(1:length(x),order); for k=1:size(n,1) p=[p;perms(n(k,:))]; end x(p)

más de 3 años hace | 0

| aceptada

Respondida
How to plot 2d graph with various variables?
I just generated example matrices for x and y. x-rows are specific thurst for various c-values, y-rows are fuel consumption valu...

más de 3 años hace | 0

Respondida
How to build a circularly symmetric matrix from a vector
[x,y]=meshgrid(0:.05:100); z=sqrt((x-50).^2+(y-50).^2); Z=(z-25)/25; Z(z>50)=nan; contour(x,y,Z,'FaceColor','flat') colorma...

más de 3 años hace | 0

Respondida
How to extract entire rows based on values placed in a single column in a matrix?
H = array2table(randi(10,100, 33)); f=find(H{:,33}>4); f=f(diff(f)>1);%removes consecutive rows >4 for k=1:length(f) c{k...

más de 3 años hace | 1

Respondida
how to count words in a cell array
ca = {{'Let it go'} {'Let it go'} { 'Can''t hold it back anymore'}} for i = 1:length(ca) a=ca{i}; a=strsplit(a{1},' '...

más de 3 años hace | 0

Respondida
how to remove an entire column in a cell array
ca = {'Name','Test1','Test2','Test3','Final'; 'A', 70 , 80 , 100, 99; 'B', 30 , 90, 95, 90; 'C', 100, 70, 8...

más de 3 años hace | 0

Respondida
Need help on a problem
You need a while loop. x=input('Enter an even integer: '); while mod(x,2)==1 x=input(sprintf('%.1f is not an even integer...

más de 3 años hace | 0

Resuelto


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

más de 3 años hace

Resuelto


Find the magnetic field around the wire

más de 3 años hace

Resuelto


Number Puzzle - 097

más de 3 años hace

Resuelto


Create a "+" flag
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

más de 3 años hace

Respondida
Question about to reconduct [for loop statement] to the code using vectorization
format long s=sum(1./(2*(0:2:500)+1)-1./(2*(1:2:501)+1))

más de 3 años hace | 0

| aceptada

Resuelto


Number Puzzle - 098

más de 3 años hace

Resuelto


Mandelbrot Number Test [Real+Imaginary]
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

más de 3 años hace

Respondida
How do I assign different variable names for different files?
Something like this should work. It would be better to place all the files into a single matrix and use indexing. for i=1:10 ...

más de 3 años hace | 0

Resuelto


Create a matrix from a cell
In this problem , you must convert a cell into a matrix and pad each cell with NaN. *Example 1:* If you have the input...

más de 3 años hace

Resuelto


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

más de 3 años hace

Cargar más