A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

plus de 5 ans il y a

A résolu


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

plus de 5 ans il y a

A résolu


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

plus de 5 ans il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

plus de 5 ans il y a

A résolu


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

plus de 5 ans il y a

A résolu


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

plus de 5 ans il y a

A résolu


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

plus de 5 ans il y a

A résolu


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

plus de 5 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

plus de 5 ans il y a

A résolu


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

plus de 5 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

plus de 5 ans il y a

A résolu


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

plus de 5 ans il y a

Réponse apportée
How can i write input variables from a text file into my script
It looks like you can simply use run to run this code as a script. I would encourage you to rethink this strategy for loading p...

plus de 5 ans il y a | 0

Réponse apportée
mex -setup (SDK-7.1 for matlab 2020b)
The solution is to use a different compiler, as the SDK 7.1 is not supported for R2020b. You can find the full list here. I wou...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
.eps file is saved in black & white instead of a coloured image
Your commented code already contains the answer: you forgot the c in depsc.

plus de 5 ans il y a | 0

Réponse apportée
How to use min function so that it stops at the first minimum value in a column matrix, stores values, and then continues going until it finishes the entire matrix? (details below)
If the minimum value you're after is the same throughout the array: data=[0.200 0.300 0.400 0.001 0.002 0.003 0.004 0.003 0.002...

plus de 5 ans il y a | 1

Réponse apportée
I am trying to save the image at an specific size.
The better way is to calculate the appropriate value. However, you can also do this quick-n-dirty: [wt,f] = cwt(y,'amor',12000...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Use same algorithm for different data
The source of your problem is that you chose to put data (i.e. the counter) in the variable name. You should consider storing H...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How can I augment a toolbox to improve its capabilities?
The answer by dpb is what you should do, but the answer to the question as posed is this: Matlab is closed-source. Mathworks ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
how can I display 3 row vectors as column vectors in front of eachother using fprintf?
Just use a loop: a=[1 2 3]; b=[11 22 33]; c=[111 222 333]; for n=1:numel(a) fprintf('%d %d %d\n',a(n),b(n),c(n)) e...

plus de 5 ans il y a | 0

Réponse apportée
Error using / Matrix dimensions must agree.
If you make it an element-wise division, your code will run without errors. Since you still haven't really explained anything yo...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to read a numerical value from a static text box?
You need to strip the unit from the char array. Best practice is to keep numeric fields as pure as possible. With the uifigure-t...

plus de 5 ans il y a | 0

Réponse apportée
umlauts character interpret differently based on Matlab version.
The reason is that Matlab switched the default encoding to UTF-8 in R2020a. The only difference is how Matlab interprets the fil...

plus de 5 ans il y a | 2

Réponse apportée
how to write loop for dicom image
You can either list the file names, or properly create the file name: %clear all %clc %^^^^ These are not needed, and espe...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to put subscript/superscript in fprintf?
There are unicode <https://unicodelookup.com/#Subscript/1 subscript> and <https://unicodelookup.com/#Superscript/1 superscript> ...

plus de 5 ans il y a | 3

Réponse apportée
How to use strings in function
You need to concatenate the output of the function you created. That way you get a single char vector as the range specification...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
C++ Call Matlab error
The way I read the documentation page you linked, you need to do this: // Call function with no output by using void as the...

plus de 5 ans il y a | 1

Réponse apportée
How to input an image from the user using imread() command?
You can extract data from the clipboard with the clipboard function. If you want the user to supply a file so you can use imread...

plus de 5 ans il y a | 1

Réponse apportée
Subscript indices must either be real positive integers or logicals.
Welcome to the wonderful world of floating point numbers. Just like 1/3 cannot be represented exactly with decimal values (meani...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
pass data from app designer to .m file
The easy solution is to never use scripts for importants things. Put the code in a function so you can call it from anywhere, in...

plus de 5 ans il y a | 0

Charger plus